uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
16
pkgs/applications/science/logic/boolector/cmake-gtest.patch
Normal file
16
pkgs/applications/science/logic/boolector/cmake-gtest.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff --git a/cmake/googletest-download.cmake b/cmake/googletest-download.cmake
|
||||
index 0ec4d558..d0910313 100644
|
||||
--- a/cmake/googletest-download.cmake
|
||||
+++ b/cmake/googletest-download.cmake
|
||||
@@ -9,10 +9,7 @@ ExternalProject_Add(
|
||||
googletest
|
||||
SOURCE_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-src"
|
||||
BINARY_DIR "@GOOGLETEST_DOWNLOAD_ROOT@/googletest-build"
|
||||
- GIT_REPOSITORY
|
||||
- https://github.com/google/googletest.git
|
||||
- GIT_TAG
|
||||
- release-1.10.0
|
||||
+ URL REPLACEME
|
||||
CONFIGURE_COMMAND ""
|
||||
BUILD_COMMAND ""
|
||||
INSTALL_COMMAND ""
|
||||
70
pkgs/applications/science/logic/boolector/default.nix
Normal file
70
pkgs/applications/science/logic/boolector/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ stdenv, fetchFromGitHub, lib, python3, fetchpatch
|
||||
, cmake, lingeling, btor2tools, gtest, gmp
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "boolector";
|
||||
version = "3.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "boolector";
|
||||
repo = "boolector";
|
||||
rev = version;
|
||||
sha256 = "1smcy6yp8wvnw2brgnv5bf40v87k4v4fbdbrhi7987vja632k50z";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# present in master - remove after 3.2.2
|
||||
(fetchpatch {
|
||||
name = "fix-parser-getc-char-casts.patch";
|
||||
url = "https://github.com/Boolector/boolector/commit/cc3a70918538c1e71ea5e7273fa1ac098da37c1b.patch";
|
||||
sha256 = "0pjvagcy74vxa2q75zbshcz8j7rvhl98549xfcf5y8yyxf5h8hyq";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed s@REPLACEME@file://${gtest.src}@ ${./cmake-gtest.patch} | patch -p1
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ lingeling btor2tools gmp ];
|
||||
|
||||
cmakeFlags =
|
||||
[ "-DBUILD_SHARED_LIBS=ON"
|
||||
"-DUSE_LINGELING=YES"
|
||||
] ++ (lib.optional (gmp != null) "-DUSE_GMP=YES");
|
||||
|
||||
checkInputs = [ python3 ];
|
||||
doCheck = true;
|
||||
preCheck =
|
||||
let var = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in
|
||||
# tests modelgen and modelgensmt2 spawn boolector in another processes and
|
||||
# macOS strips DYLD_LIBRARY_PATH, hardcode it for testing
|
||||
lib.optionalString stdenv.isDarwin ''
|
||||
cp -r bin bin.back
|
||||
install_name_tool -change libboolector.dylib $(pwd)/lib/libboolector.dylib bin/boolector
|
||||
'' + ''
|
||||
export ${var}=$(readlink -f lib)
|
||||
patchShebangs ..
|
||||
'';
|
||||
|
||||
postCheck = lib.optionalString stdenv.isDarwin ''
|
||||
rm -rf bin
|
||||
mv bin.back bin
|
||||
'';
|
||||
|
||||
# this is what haskellPackages.boolector expects
|
||||
postInstall = ''
|
||||
cp $out/include/boolector/boolector.h $out/include/boolector.h
|
||||
cp $out/include/boolector/btortypes.h $out/include/btortypes.h
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An extremely fast SMT solver for bit-vectors and arrays";
|
||||
homepage = "https://boolector.github.io";
|
||||
license = licenses.mit;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [ thoughtpolice ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue