-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
77 lines (57 loc) · 1.67 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
{
description = "The Alaska Handle-Based Memory Management System";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.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
coreutils # For our bash scripts
python3 # For running bin/alaska-transform
file
getconf
];
buildInputs = with pkgs; runInputs ++ [
cmake
makeWrapper
python3Packages.pip
gdb ps which git
zlib
bashInteractive
];
in
with pkgs; {
devShell = mkShell {
buildInputs = buildInputs;
shellHook = ''
source $PWD/enable
'';
};
packages.default = pkgs.stdenv.mkDerivation {
name = "alaska";
nativeBuildInputs = [ cmake ];
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
preConfigure = ''
make defconfig
'';
buildInputs = buildInputs;
postFixup = ''
for b in $out/bin/*; do
wrapProgram $b --set PATH ${lib.makeBinPath runInputs } \
--prefix PATH : $out/bin
done
'';
};
}
);
}