-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
54 lines (49 loc) · 1.43 KB
/
default.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
# we ping nixpkgs soureces here according to https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/3c52ea8c9216a0d5b7a7b4d74a9d2e858b06df5c.tar.gz") {}
}:
pkgs.mkShell {
# find packages here: https://search.nixos.org/packages
# add libraries here
buildInputs = [
pkgs.libndctl
pkgs.glib
];
# add tools here
nativeBuildInputs = [
pkgs.gcc10
pkgs.pkg-config
pkgs.pandoc
pkgs.m4
pkgs.bc
pkgs.bashInteractive
pkgs.cmake
pkgs.dos2unix
pkgs.binutils-unwrapped
pkgs.gdb
pkgs.python
pkgs.valgrind
pkgs.autoreconfHook
pkgs.numactl
(pkgs.python39.withPackages (ps: [
ps.matplotlib
ps.pyyaml
ps.seaborn
]))
(pkgs.callPackage ./impure-clang.nix {})
];
shellHook = ''
export CMAKE_C_COMPILER=clang
export CC=clang
export CMAKE_CXX_COMPILER=clang++
export CXX=clang++
#export CMAKE_C_COMPILER=${pkgs.gcc}/bin/gcc
#export CC=${pkgs.gcc}/bin/gcc
#export CMAKE_CXX_COMPILER=${pkgs.gcc}/bin/g++
#export CXX=${pkgs.gcc}/bin/g++
export BINUTILS_DIR=${pkgs.binutils-unwrapped}/include
'';
## Disable mapping address randomization and provide PMDK with appropriately low mapping address hint:
PMEM_MMAP_HINT = 0;
## If your machine is not equipped with PM, export the following flag to use flush instructions instead of msync:
PMEM_IS_PMEM_FORCE = 1;
}