-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
42 lines (37 loc) · 948 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
30
31
32
33
34
35
36
37
38
39
40
41
42
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
futils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
rust-overlay,
futils,
} @ inputs: let
inherit (nixpkgs) lib;
inherit (futils.lib) eachDefaultSystem defaultSystems;
nixpkgsFor = lib.genAttrs defaultSystems (system:
import nixpkgs {
inherit system;
overlays = [
rust-overlay.overlays.default
];
});
in
eachDefaultSystem (system: let
pkgs = nixpkgsFor.${system};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
openssl
pkg-config
git
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
RUST_BACKTRACE = 1;
};
});
}