forked from runtimeverification/k
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.nix
More file actions
76 lines (68 loc) · 1.49 KB
/
test.nix
File metadata and controls
76 lines (68 loc) · 1.49 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
let
sources = import ./nix/sources.nix;
pinned = import sources."nixpkgs" {
config = { };
overlays = [ ];
};
in { pkgs ? pinned, test ? null }:
let
inherit (pkgs) stdenv lib;
inherit (pkgs) bison diffutils ncurses gmp mpfr libffi jemalloc;
default = import ./. { inherit pkgs; };
inherit (default) k haskell-backend llvm-backend;
inherit (default) clang;
ttuegel = import sources."ttuegel" { inherit pkgs; };
inherit (ttuegel) cleanGitSubtree;
in stdenv.mkDerivation {
name = "k-test";
src = cleanGitSubtree {
name = "k-distribution";
src = ./.;
subDir = "k-distribution";
};
preferLocalBuild = true;
buildInputs = [
diffutils
ncurses
bison
clang
gmp
mpfr
libffi
jemalloc
k
haskell-backend
llvm-backend
];
postPatch = ''
patchShebangs tests/regression-new
'';
buildFlags = [
# Find executables on PATH
"KOMPILE=kompile"
"KRUN=krun"
"KDEP=kdep"
"KPROVE_LEGACY=kprove-legacy"
"KPROVE=kprove"
"KBMC=kbmc"
"KAST=kast"
"KPRINT=kprint"
"KRUN_LEGACY=krun-legacy"
"KEQ=keq"
"KSERVER=kserver"
"KPARSE=kparse"
"KPARSE_GEN=kparse-gen"
"KORE_PRINT=kore-print"
"PACKAGE_VERSION=${lib.fileContents ./package/version}"
"--output-sync"
] ++ lib.optional (test != null) "-C ${test}";
enableParallelBuilding = true;
preBuild = ''
cd tests/regression-new
'';
installPhase = ''
runHook preInstall
touch "$out"
runHook postInstall
'';
}