2021-08-29 11:36:35 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
|
|
|
, drat-trim, p7zip
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kissat";
|
2024-10-13 18:07:02 +01:00
|
|
|
version = "4.0.1";
|
2021-08-29 11:36:35 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arminbiere";
|
|
|
|
repo = "kissat";
|
2022-09-02 09:24:30 +01:00
|
|
|
rev = "rel-${version}";
|
2024-10-13 18:07:02 +01:00
|
|
|
sha256 = "sha256-+y9TlSEgnMTtRT9F6OBSle9OqGfljChcHOFJ5lgwjyk=";
|
2021-08-29 11:36:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [ drat-trim p7zip ];
|
2021-08-29 11:36:35 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
# 'make test' assumes that /etc/passwd is not writable.
|
|
|
|
patches = [ ./writable-passwd-is-ok.patch ];
|
|
|
|
|
|
|
|
# the configure script is not generated by autotools and does not accept the
|
|
|
|
# arguments that the default configurePhase passes like --prefix and --libdir
|
|
|
|
dontAddPrefix = true;
|
|
|
|
setOutputFlags = false;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -Dm0755 build/kissat "$out/bin/kissat"
|
|
|
|
install -Dm0644 src/kissat.h "$dev/include/kissat.h"
|
|
|
|
install -Dm0644 build/libkissat.a "$lib/lib/libkissat.a"
|
|
|
|
mkdir -p "$out/share/doc/kissat/"
|
|
|
|
install -Dm0644 {LICEN?E,README*,VERSION} "$out/share/doc/kissat/"
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "'keep it simple and clean bare metal SAT solver' written in C";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "kissat";
|
2021-08-29 11:36:35 +01:00
|
|
|
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;
|
2023-10-30 20:41:44 +00:00
|
|
|
homepage = "https://fmv.jku.at/kissat";
|
2021-08-29 11:36:35 +01:00
|
|
|
};
|
|
|
|
}
|