23 lines
718 B
Nix
23 lines
718 B
Nix
{
|
|
inputs.nixpkgsUnstable.url = "github:nixos/nixpkgs";
|
|
|
|
outputs = { self, nixpkgs, nixpkgsUnstable, flake-utils }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.cudaSupport = true;
|
|
};
|
|
pkgsUnstable = import nixpkgsUnstable {
|
|
inherit system;
|
|
config.cudaSupport = true;
|
|
config.allowUnfreePredicate = pkg:
|
|
builtins.elem (nixpkgs.lib.getName pkg) [ "cudatoolkit" ];
|
|
};
|
|
in {
|
|
devShell = pkgs.mkShell {
|
|
packages = (with pkgs; [ clang-tools gdb octave ])
|
|
++ (with pkgsUnstable.cudaPackages_12; [ cudatoolkit ]);
|
|
};
|
|
});
|
|
}
|