blob: 89a3587a85b8498e3200f5df099591dbfacc7066 (
about) (
plain)
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
|
{
lib,
clangStdenv,
fetchFromGitHub,
re2c,
z3,
hiredis,
llvm_18,
cmake,
ninja,
nix-update-script,
}:
clangStdenv.mkDerivation (finalAttrs: {
pname = "alive2";
version = "20.0";
src = fetchFromGitHub {
owner = "AliveToolkit";
repo = "alive2";
tag = "v${finalAttrs.version}";
hash = "sha256-4QNrBRGH+rxXwb7zTRYAixxipN3ybcXuWCmO+BLU9r4=";
};
nativeBuildInputs = [
cmake
ninja
re2c
];
buildInputs = [
z3
hiredis
llvm_18
];
strictDeps = true;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail '-Werror' "" \
--replace-fail 'find_package(Git REQUIRED)' ""
'';
env = {
ALIVE2_HOME = "$PWD";
LLVM2_HOME = "${llvm_18}";
LLVM2_BUILD = "$LLVM2_HOME/build";
};
preBuild = ''
mkdir -p build
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp alive $out/bin/
cp alive-jobserver $out/bin/
rm -rf $out/bin/CMakeFiles $out/bin/*.o
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Automatic verification of LLVM optimizations";
homepage = "https://github.com/AliveToolkit/alive2";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ shogo ] ++ lib.teams.ngi.members;
mainProgram = "alive";
};
})
|