-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
54 lines (52 loc) · 1.33 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
{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
flake-utils.url = github:numtide/flake-utils;
devshell = {
url = "github:numtide/devshell";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
rust-overlay = {
url = github:oxalica/rust-overlay;
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
};
};
outputs = { self, nixpkgs, flake-utils, devshell, rust-overlay }:
with flake-utils.lib;
eachSystem [ system.x86_64-linux ] (system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
devshell.overlays.default
rust-overlay.overlays.default
];
};
in {
packages = { inherit (pkgs.callPackage ./package.nix {})
nixcache demo default;
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
git
rust-analyzer
cargo-edit
cargo-machete
rust-bin.stable.latest.default
gcc
pkg-config
nix
boost
libclang.lib
rustPlatform.bindgenHook
];
NIX_PATH = "nixpkgs=${pkgs.path}";
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library";
};
});
}