-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
91 lines (66 loc) · 1.97 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
description = "The Alaska Handle-Based Memory Management System";
inputs = {
nixpkgs.url = "nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
runInputs = with pkgs; [
llvmPackages_16.libllvm
llvmPackages_16.clang
llvmPackages_16.stdenv
llvmPackages_16.libunwind
llvmPackages_16.openmp
(gllvm.overrideAttrs {
doCheck = false;
})
valgrind
valgrind.dev
coreutils # For our bash scripts
python3 # For running bin/alaska-transform
file
getconf
];
buildInputs = with pkgs; runInputs ++ [
cmake
gtest
makeWrapper
python3Packages.pip
gdb ps which git
zlib
wget
bashInteractive
];
in
with pkgs; {
devShell = mkShell {
inherit buildInputs;
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
hardeningDisable = ["all"];
shellHook = ''
source $PWD/enable
'';
};
packages.default = pkgs.stdenv.mkDerivation {
name = "alaska";
nativeBuildInputs = [ cmake ];
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
cmakeFlags = [
"-DCMAKE_C_COMPILER=clang"
"-DCMAKE_CXX_COMPILER=clang++"
];
inherit buildInputs;
postFixup = ''
for b in $out/bin/*; do
wrapProgram $b --set PATH ${lib.makeBinPath runInputs } \
--prefix PATH : $out/bin
done
'';
};
}
);
}