csci5451/flake.nix

24 lines
718 B
Nix
Raw Normal View History

2023-12-10 21:40:31 +00:00
{
inputs.nixpkgsUnstable.url = "github:nixos/nixpkgs";
outputs = { self, nixpkgs, nixpkgsUnstable, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
2023-12-10 22:57:24 +00:00
pkgs = import nixpkgs {
inherit system;
config.cudaSupport = true;
};
2023-12-10 21:40:31 +00:00
pkgsUnstable = import nixpkgsUnstable {
inherit system;
2023-12-10 22:57:24 +00:00
config.cudaSupport = true;
2023-12-10 21:40:31 +00:00
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 ]);
};
});
}