-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
59 lines (57 loc) · 1.26 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = "Rust nixity";
inputs = {
devenv.url = "github:cachix/devenv";
nixities.url = "github:ereslibre/nixities";
systems.url = "github:nix-systems/default";
};
outputs = {
self,
devenv,
nixities,
systems,
...
} @ inputs: let
forEachSystem = nixities.nixpkgs.lib.genAttrs (import systems);
in {
devShells = forEachSystem (system: let
pkgs = import nixities.nixpkgs {
inherit system;
config = {
allowUnfree = true;
cudaSupport = true;
};
};
in {
# The default devShell
default = devenv.lib.mkShell {
inherit pkgs;
inputs.nixpkgs = nixities.nixpkgs;
modules = [
({
pkgs,
lib,
...
}: {
languages.c.enable = false;
languages.rust = {
enable = true;
};
packages = (with pkgs; [
gcc11
gcc11Stdenv
cudaPackages.cuda_nvcc
cudatoolkit
openssl
pkg-config
]);
pre-commit.hooks = {
rustfmt.enable = true;
clippy.enable = true;
};
})
];
};
});
};
}