forked from openebs/mayastor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
53 lines (47 loc) · 1.2 KB
/
shell.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
{ channel ? "nightly" }:
let
nixpkgs = (import ./nix/lib/nixPackages.nix) { };
pkgs = import nixpkgs {
config = { };
overlays = [ (import ./nix/mayastor-overlay.nix) ];
};
in
with pkgs;
let
rustChannel = import ./nix/lib/rust.nix {
inherit fetchFromGitHub;
inherit pkgs;
};
libspdk = pkgs.libspdk.override { enableDebug = true; };
in
mkShell {
# fortify does not work with -O0 which is used by spdk when --enable-debug
hardeningDisable = [ "fortify" ];
buildInputs = [
figlet
fio
gdb
gptfdisk
libiscsi.bin
nodejs
nodePackages.semistandard
nvme-cli
pre-commit
python3
rustChannel.${channel}.rust
] ++ mayastor.buildInputs;
LIBCLANG_PATH = mayastor.LIBCLANG_PATH;
PROTOC = mayastor.PROTOC;
PROTOC_INCLUDE = mayastor.PROTOC_INCLUDE;
# to avoid clobbering the top-level include dir
# with SPDK private header files, we need have put
# the headers elsewhere. (files are always stored in
# /bin, /include etc)
# XXX: we can also not set this and change the paths
# in wrapper.h? this only effects our bindings
C_INCLUDE_PATH = "${libspdk}/include/spdk";
shellHook = ''
pre-commit install
figlet ${channel}
'';
}