-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
29 lines (26 loc) · 846 Bytes
/
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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShell = with pkgs; mkShell {
nativeBuildInputs = with pkgs; [
cargo rustc rustfmt rustPackages.clippy clang gdb
];
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
# https://github.com/rust-lang/rust-bindgen#environment-variables
BINDGEN_EXTRA_CLANG_ARGS =
(builtins.map (a: ''-I"${a}/include"'') [
# TODO is this still using glib headers?
# use the default kernel package of the current nixos here to (at a minimum) support most nixos installations
pkgs.linuxPackages.kernel.dev
]);
};
});
}