-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
70 lines (67 loc) · 1.81 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
60
61
62
63
64
65
66
67
68
69
70
{
description = "Developement environment for Nix users";
inputs = {
devshell.url = "github:numtide/devshell";
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, flake-utils, devshell, nixpkgs, fenix }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let pkgs = import nixpkgs {
inherit system;
overlays = [ devshell.overlay fenix.overlay ];
};
in
pkgs.devshell.mkShell {
imports = [ "${pkgs.devshell.extraModulesDir}/language/c.nix" ];
commands = [
{
package = pkgs.devshell.cli;
help = "Per project developer environments";
}
{
category = "project commands";
name = "run";
command = "cargo r";
help = "runs this project";
}
{
category = "project commands";
name = "build";
command = "cargo b";
help = "builds this project";
}
];
devshell.packages = with pkgs; [
(pkgs.fenix.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
rust-analyzer-nightly
gitflow
pkgconfig
];
language.c.libraries = with pkgs; [
];
language.c.includes = with pkgs; [
cairo
glib
gdk-pixbuf
harfbuzz
gobject-introspection
graphene
gtk4
libadwaita
pango
appstream-glib
];
};
});
}