-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
53 lines (49 loc) · 1.15 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
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs =
{
self,
nixpkgs,
rust-overlay,
}:
let
inherit (nixpkgs.lib) genAttrs systems;
forEachSystem =
f:
genAttrs systems.flakeExposed (
system:
f (
import nixpkgs {
overlays = [ (import rust-overlay) ];
inherit system;
}
)
);
in
{
devShells = forEachSystem (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
rustfmt
clippy
rust-analyzer
];
};
});
packages = forEachSystem (pkgs: {
default = pkgs.rustPlatform.buildRustPackage {
pname = "hensight";
version = "0.0.1";
src = ./.;
useFetchCargoVendor = true;
cargoHash = "sha256-xTjQ4wjEEDN2MdorKkw+rSmI6ua02eI1TonWHFJsbTY=";
nativeBuildInputs = [ pkgs.pkg-config ];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
};
});
};
}