-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
79 lines (79 loc) · 1.21 KB
/
Copy pathdefault.nix
File metadata and controls
79 lines (79 loc) · 1.21 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
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
{
pkgs,
lib,
stdenv,
cmake,
which,
ninja,
clangCompiler,
yaml-cpp,
lit,
filecheck,
yq,
jq,
ruby,
gtest,
pandoc,
qemu,
llvmPackages,
llvmLib,
llvmSnippy,
runTests ? true,
...
}:
let
fs = lib.fileset;
versionJson = builtins.fromJSON (builtins.readFile ./version.json);
in
stdenv.mkDerivation {
pname = "llvm-bleach";
version = versionJson.version;
src = fs.toSource {
root = ./.;
fileset = fs.unions [
./CMakeLists.txt
./lib
./tools
./cmake
./include
./test
./docs
./version.json
];
};
nativeBuildInputs = [
cmake
ninja
# for symtab operations
clangCompiler
];
buildInputs = [
llvmLib
yaml-cpp
pandoc
];
strictDeps = true;
enableShared = false;
nativeCheckInputs = [
lit
filecheck
qemu
llvmSnippy
llvmPackages.bintools
which
clangCompiler
yq
jq
ruby
]
++ (with pkgs; [
pkgsCross.riscv64.buildPackages.clang
pkgsCross.riscv64.buildPackages.llvmPackages_21.bintools
pkgsCross.aarch64-multiplatform.buildPackages.llvmPackages_21.clang
]);
preCheck = ''
patchShebangs ..
'';
checkInputs = [ gtest ];
doCheck = runTests;
}