about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorAustin Seipp <aseipp@pobox.com>2018-08-15 14:58:19 -0500
committerAustin Seipp <aseipp@pobox.com>2018-08-15 20:44:05 -0500
commit68cc845295c1f2093ee2451865b7b0f4e3368366 (patch)
tree73fb9afb687c025d02935a773bf5e4f571710cc7 /pkgs/applications/science
parent6e910b2b3d3815f24280f707467b46becc7fa549 (diff)
downloadnixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar.gz
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar.bz2
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar.lz
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar.xz
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.tar.zst
nixlib-68cc845295c1f2093ee2451865b7b0f4e3368366.zip
lingeling: init at pre1_03b4860d
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/logic/lingeling/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/science/logic/lingeling/default.nix b/pkgs/applications/science/logic/lingeling/default.nix
new file mode 100644
index 000000000000..000587a22e67
--- /dev/null
+++ b/pkgs/applications/science/logic/lingeling/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, fetchFromGitHub
+, aiger
+}:
+
+stdenv.mkDerivation rec {
+  name = "lingeling-${version}";
+  # This is the version used in satcomp2018, which was
+  # relicensed, and also known as version 'bcj'
+  version = "pre1_03b4860d";
+
+  src = fetchFromGitHub {
+    owner  = "arminbiere";
+    repo   = "lingeling";
+    rev    = "03b4860d14016f42213ea271014f2f13d181f504";
+    sha256 = "1lw1yfy219p7rrk88sbq4zl24b70040zapbjdrpv5a6i0jsblksx";
+  };
+
+  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" ];
+
+  meta = with stdenv.lib; {
+    description = "Fast SAT solver";
+    homepage    = http://fmv.jku.at/lingeling/;
+    license     = licenses.mit;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}