bitwuzla: fix kissat not compiled in
error (#400299)
This commit is contained in:
commit
0f88b38c1e
@ -12,6 +12,7 @@
|
||||
gmp,
|
||||
cadical,
|
||||
cryptominisat,
|
||||
kissat,
|
||||
zlib,
|
||||
pkg-config,
|
||||
cmake,
|
||||
@ -37,6 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
ninja
|
||||
cmake
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cadical
|
||||
cryptominisat
|
||||
@ -44,6 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
symfpu
|
||||
gmp
|
||||
zlib
|
||||
kissat
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
@ -51,6 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# but setting it to shared works even in pkgsStatic
|
||||
"-Ddefault_library=shared"
|
||||
"-Dcryptominisat=true"
|
||||
"-Dkissat=true"
|
||||
|
||||
(lib.strings.mesonEnable "testing" finalAttrs.finalPackage.doCheck)
|
||||
];
|
||||
@ -77,6 +81,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
set -euxo pipefail;
|
||||
$out/bin/bitwuzla -S cms -j 3 -m file.smt2 | tee /dev/stderr | grep $needle;
|
||||
$out/bin/bitwuzla -S cadical -m file.smt2 | tee /dev/stderr | grep $needle;
|
||||
$out/bin/bitwuzla -S kissat -m file.smt2 | tee /dev/stderr | grep $needle;
|
||||
)
|
||||
|
||||
runHook postInstallCheck
|
||||
|
@ -4,8 +4,25 @@
|
||||
fetchFromGitHub,
|
||||
drat-trim,
|
||||
p7zip,
|
||||
pkg-config,
|
||||
}:
|
||||
|
||||
let
|
||||
# Early meta to reference in pkgconfig generation
|
||||
meta = with lib; {
|
||||
description = "'keep it simple and clean bare metal SAT solver' written in C";
|
||||
mainProgram = "kissat";
|
||||
longDescription = ''
|
||||
Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
|
||||
It is a port of CaDiCaL back to C with improved data structures,
|
||||
better scheduling of inprocessing and optimized algorithms and implementation.
|
||||
'';
|
||||
maintainers = with maintainers; [ shnarazk ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "https://fmv.jku.at/kissat";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "kissat";
|
||||
version = "4.0.2";
|
||||
@ -23,6 +40,10 @@ stdenv.mkDerivation rec {
|
||||
"lib"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
drat-trim
|
||||
p7zip
|
||||
@ -37,6 +58,14 @@ stdenv.mkDerivation rec {
|
||||
dontAddPrefix = true;
|
||||
setOutputFlags = false;
|
||||
|
||||
configurePhase = ''
|
||||
./configure
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make -j$NIX_BUILD_CORES
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
@ -46,20 +75,23 @@ stdenv.mkDerivation rec {
|
||||
mkdir -p "$out/share/doc/kissat/"
|
||||
install -Dm0644 {LICEN?E,README*,VERSION} "$out/share/doc/kissat/"
|
||||
|
||||
# Create pkgconfig
|
||||
mkdir -p $dev/lib/pkgconfig
|
||||
cat > $dev/lib/pkgconfig/kissat.pc <<EOF
|
||||
prefix=${placeholder "dev"}
|
||||
exec_prefix=\''${prefix}
|
||||
libdir=${placeholder "lib"}/lib
|
||||
includedir=\''${prefix}/include
|
||||
|
||||
Name: ${pname}
|
||||
Description: ${meta.description}
|
||||
Version: ${version}
|
||||
Libs: -L\''${libdir} -lkissat
|
||||
Cflags: -I\''${includedir}
|
||||
EOF
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "'keep it simple and clean bare metal SAT solver' written in C";
|
||||
mainProgram = "kissat";
|
||||
longDescription = ''
|
||||
Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
|
||||
It is a port of CaDiCaL back to C with improved data structures,
|
||||
better scheduling of inprocessing and optimized algorithms and implementation.
|
||||
'';
|
||||
maintainers = with maintainers; [ shnarazk ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.mit;
|
||||
homepage = "https://fmv.jku.at/kissat";
|
||||
};
|
||||
inherit meta;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user