forked from peer-observer/peer-observer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
53 lines (42 loc) · 1.28 KB
/
shell.nix
File metadata and controls
53 lines (42 loc) · 1.28 KB
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
{ pkgs ? import <nixpkgs> {}}:
let
llvm = pkgs.llvmPackages_21;
in
pkgs.mkShell {
hardeningDisable = [ "stackprotector" "fortify" ];
buildInputs = [
pkgs.rustc
pkgs.cargo
pkgs.clippy
pkgs.cmake
pkgs.protobuf
pkgs.rustfmt
pkgs.bpftools
# libbpf CO-RE pkgs
#
# use the unwrapped clang:
# Since clang_15 this is needed to avoid running into:
# cc-wrapper is currently not designed with multi-target compilers in mind. You may want to use an un-wrapped compiler instead.
llvm.clang-unwrapped
pkgs.elfutils
pkgs.zlib
pkgs.pkg-config
pkgs.which
pkgs.linuxHeaders
# for code coverage:
pkgs.cargo-tarpaulin
# for integration tests
pkgs.bitcoind
];
shellHook = ''
# during the integration tests, don't try to download a bitcoind binary
# use the nix one instead
export BITCOIND_SKIP_DOWNLOAD=1
export BITCOIND_EXE=${pkgs.bitcoind}/bin/bitcoind
# set the path of the Linux kernel headers. These are needed in
# build.rs of the ebpf-extractor on Nix.
export KERNEL_HEADERS=${pkgs.linuxHeaders}/include
'';
# Use for running integration tests
NATS_SERVER_BINARY = "${pkgs.nats-server}/bin/nats-server";
}