forked from Cardinal-Cryptography/aleph-node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
20 lines (20 loc) · 721 Bytes
/
shell.nix
File metadata and controls
20 lines (20 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ buildOptions ? {}
, rustToolchainFile ? ./rust-toolchain
}:
let
versions = import ./nix/versions.nix { inherit rustToolchainFile; };
nixpkgs = versions.nixpkgs;
env = versions.stdenv;
project = import ./default.nix ( buildOptions // { inherit versions; } );
rust = versions.rustToolchain.rust.override {
extensions = [ "rust-src" ];
};
nativeBuildInputs = [rust nixpkgs.cacert nixpkgs.openssl] ++ project.nativeBuildInputs;
in
nixpkgs.mkShell.override { stdenv = env; }
{
inherit nativeBuildInputs;
inherit (project) buildInputs shellHook;
# RUST_SRC_PATH might be needed by the `rust-analyzer`
RUST_SRC_PATH = "${versions.rustToolchain.rust-src}/lib/rustlib/src/rust/library/";
}