klee: 2.2 -> 2.3

* klee: 2.2 -> 2.3
This commit is contained in:
Jonas Heinrich
2022-07-07 09:18:27 -03:00
committed by GitHub
parent b2b431c2f1
commit fc4b3a846d
2 changed files with 33 additions and 46 deletions
@@ -1,10 +1,9 @@
{ lib
, callPackage
, fetchFromGitHub
, fetchpatch
, cmake
, llvmPackages_9
, clang_9
, llvmPackages_11
, clang
, python3
, zlib
, z3
@@ -36,31 +35,43 @@
}:
let
# Python used for KLEE tests.
kleePython = python3.withPackages (ps: with ps; [ tabulate ]);
# The klee-uclibc derivation.
kleeuClibc = callPackage ./klee-uclibc.nix {
inherit clang_9 llvmPackages_9 extraKleeuClibcConfig debugRuntime runtimeAsserts;
inherit clang llvmPackages_11 extraKleeuClibcConfig debugRuntime runtimeAsserts;
};
in
clang_9.stdenv.mkDerivation rec {
clang.stdenv.mkDerivation rec {
pname = "klee";
version = "2.2";
version = "2.3";
src = fetchFromGitHub {
owner = "klee";
repo = "klee";
rev = "v${version}";
sha256 = "Ar3BKfADjJvvP0dI9+x/l3RDs8ncx4jmO7ol4MgOr4M=";
sha256 = "sha256-E1c6K6Q+LAWm342W8I00JI6+LMvqmULHZLkv9Kj5RmY=";
};
buildInputs = [
llvmPackages_9.llvm
z3 stp cryptominisat
gperftools sqlite
cryptominisat
gperftools
lit # Configure phase checking for lit
llvmPackages_11.llvm
sqlite
stp
z3
];
nativeBuildInputs = [
cmake clang_9
clang
cmake
];
checkInputs = [
gtest
@@ -94,34 +105,7 @@ clang_9.stdenv.mkDerivation rec {
patchShebangs .
'';
patches = map fetchpatch [
/* This patch is currently necessary for the unit test suite to run correctly.
* See https://www.mail-archive.com/klee-dev@imperial.ac.uk/msg03136.html
* and https://github.com/klee/klee/pull/1458 for more information.
*/
{
name = "fix-gtest";
sha256 = "F+/6videwJZz4sDF9lnV4B8lMx6W11KFJ0Q8t1qUDf4=";
url = "https://github.com/klee/klee/pull/1458.patch";
}
# This patch fixes test compile issues with glibc 2.33+.
{
name = "fix-glibc-2.33";
sha256 = "PzxqtFyLy9KF1eA9AAKg1tu+ggRdvu7leuvXifayIcc=";
url = "https://github.com/klee/klee/pull/1385.patch";
}
# /etc/mtab doesn't exist in the Nix build sandbox.
{
name = "fix-etc-mtab-in-tests";
sha256 = "2Yb/rJA791esNNqq8uAXV+MML4YXIjPKkHBOufvyRoQ=";
url = "https://github.com/klee/klee/pull/1471.patch";
}
];
doCheck = true;
checkTarget = "check";
passthru = {
# Let the user depend on `klee.uclibc` for klee-uclibc
@@ -3,9 +3,10 @@
, fetchFromGitHub
, which
, linuxHeaders
, clang_9
, llvmPackages_9
, clang
, llvmPackages_11
, python3
, curl
, debugRuntime ? true
, runtimeAsserts ? false
, extraKleeuClibcConfig ? {}
@@ -23,18 +24,20 @@ let
"DEVEL_PREFIX" = "/";
});
in
clang_9.stdenv.mkDerivation rec {
clang.stdenv.mkDerivation rec {
pname = "klee-uclibc";
version = "1.2";
version = "1.3";
src = fetchFromGitHub {
owner = "klee";
repo = "klee-uclibc";
rev = "klee_uclibc_v${version}";
sha256 = "qdrGMw+2XwpDsfxdv6swnoaoACcF5a/RWgUxUYbtPrI=";
sha256 = "sha256-xQ8GWa0Gmd3lbwKodJhrsZeuR4j7NT4zIUh+kNhVY/w=";
};
nativeBuildInputs = [
clang_9
llvmPackages_9.llvm
clang
curl
llvmPackages_11.llvm
python3
which
];
@@ -44,7 +47,7 @@ clang_9.stdenv.mkDerivation rec {
# HACK: needed for cross-compile.
# See https://www.mail-archive.com/klee-dev@imperial.ac.uk/msg03141.html
KLEE_CFLAGS = "-idirafter ${clang_9}/resource-root/include";
KLEE_CFLAGS = "-idirafter ${clang}/resource-root/include";
prePatch = ''
patchShebangs ./configure