2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiger
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "lingeling";
|
2021-12-06 16:07:01 +00:00
|
|
|
# This is the version used in satcomp2020
|
|
|
|
version = "pre1_708beb26";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "arminbiere";
|
|
|
|
repo = "lingeling";
|
2021-12-06 16:07:01 +00:00
|
|
|
rev = "708beb26a7d5b5d5e7abd88d6f552fb1946b07c1";
|
|
|
|
sha256 = "1lb2g37nd8qq5hw5g6l691nx5095336yb2zlbaw43mg56hkj8357";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
configurePhase = ''
|
|
|
|
./configure.sh
|
|
|
|
|
|
|
|
# Rather than patch ./configure, just sneak in use of aiger here, since it
|
|
|
|
# doesn't handle real build products very well (it works on a build-time
|
|
|
|
# dir, not installed copy)... This is so we can build 'blimc'
|
|
|
|
substituteInPlace ./makefile \
|
|
|
|
--replace 'targets: liblgl.a' 'targets: liblgl.a blimc' \
|
|
|
|
--replace '$(AIGER)/aiger.o' '${aiger.lib}/lib/aiger.o' \
|
|
|
|
--replace '$(AIGER)/aiger.h' '${aiger.dev}/include/aiger.h' \
|
|
|
|
--replace '-I$(AIGER)' '-I${aiger.dev}/include'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $lib/lib $dev/include
|
|
|
|
|
|
|
|
cp lglib.h $dev/include
|
|
|
|
cp liblgl.a $lib/lib
|
|
|
|
|
|
|
|
cp lingeling plingeling treengeling ilingeling blimc $out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" "lib" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fast SAT solver";
|
|
|
|
homepage = "http://fmv.jku.at/lingeling/";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
|
|
};
|
|
|
|
}
|