-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflake.nix
43 lines (39 loc) · 1.12 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
{
inputs = {
pkgs.url = "github:NixOS/nixpkgs/f4341811740ba37cc17962dd1da929bd32dbeb91"; # 24-8-7
rust-overlay = {
url = "github:oxalica/rust-overlay/57a1564c924ee4acbffe0ad3d65c7e90d3e77cd8"; # 24-9-8
inputs.nixpkgs.follows = "pkgs";
};
flake-utils.url = "github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a"; # 24-3-11
};
outputs = inputs@{ ... }: inputs.flake-utils.lib.eachDefaultSystem (system:
let
name = "psh";
pkgs = import inputs.pkgs {
overlays = [ (import inputs.rust-overlay) ];
inherit system;
};
toolchain = pkgs.rust-bin.stable."1.81.0".complete.override {
extensions = [ "rust-src" ];
targets = [ "x86_64-unknown-linux-gnu" "wasm32-wasip1" ];
};
compileTimeDeps = with pkgs; [
git
protobuf
toolchain
pkg-config
];
runTimeDeps = with pkgs; [
libgcc
openssl_3_3.dev
];
in
{
devShells.default = pkgs.mkShell {
inherit name;
nativeBuildInputs = compileTimeDeps;
buildInputs = runTimeDeps;
};
});
}