presenterm: 0.9.0 -> 0.10.0 (#378946)
[NixPkgs.git] / pkgs / by-name / li / lingeling / package.nix
blob80cc5da336a05ccce70b673f9fe4ac476f9af92a
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   aiger,
6 }:
8 stdenv.mkDerivation {
9   pname = "lingeling";
10   # This is the version used in satcomp2020
11   version = "pre1_708beb26";
13   src = fetchFromGitHub {
14     owner = "arminbiere";
15     repo = "lingeling";
16     rev = "708beb26a7d5b5d5e7abd88d6f552fb1946b07c1";
17     sha256 = "1lb2g37nd8qq5hw5g6l691nx5095336yb2zlbaw43mg56hkj8357";
18   };
20   configurePhase = ''
21     ./configure.sh
23     # Rather than patch ./configure, just sneak in use of aiger here, since it
24     # doesn't handle real build products very well (it works on a build-time
25     # dir, not installed copy)... This is so we can build 'blimc'
26     substituteInPlace ./makefile \
27       --replace 'targets: liblgl.a' 'targets: liblgl.a blimc'      \
28       --replace '$(AIGER)/aiger.o'  '${aiger.lib}/lib/aiger.o'     \
29       --replace '$(AIGER)/aiger.h'  '${aiger.dev}/include/aiger.h' \
30       --replace '-I$(AIGER)'        '-I${aiger.dev}/include'
31   '';
33   installPhase = ''
34     mkdir -p $out/bin $lib/lib $dev/include
36     cp lglib.h  $dev/include
37     cp liblgl.a $lib/lib
39     cp lingeling plingeling treengeling ilingeling blimc $out/bin
40   '';
42   outputs = [
43     "out"
44     "dev"
45     "lib"
46   ];
48   meta = with lib; {
49     description = "Fast SAT solver";
50     homepage = "http://fmv.jku.at/lingeling/";
51     license = licenses.mit;
52     platforms = platforms.unix;
53     maintainers = with maintainers; [ thoughtpolice ];
54   };