about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/logic/coq/default.nix2
-rw-r--r--pkgs/applications/science/logic/z3/tptp.nix31
2 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix
index 5fab9788a94a..0a4e1dddcae3 100644
--- a/pkgs/applications/science/logic/coq/default.nix
+++ b/pkgs/applications/science/logic/coq/default.nix
@@ -25,7 +25,7 @@ let
    "8.8.0" = "13a4fka22hdxsjk11mgjb9ffzplfxyxp1sg5v1c8nk1grxlscgw8";
    "8.8.1" = "1hlf58gwazywbmfa48219amid38vqdl94yz21i11b4map6jfwhbk";
    "8.8.2" = "1lip3xja924dm6qblisk1bk0x8ai24s5xxqxphbdxj6djglj68fd";
-   "8.9+beta1" = "1yxv2klqal3mh6symi3gc6gv3xm684zlld2c0b6ijhjmp865cin8";
+   "8.9.0" = "1dkgdjc4n1m15m1p724hhi5cyxpqbjw6rxc5na6fl3v4qjjfnizh";
   }."${version}";
   coq-version = builtins.substring 0 3 version;
   ideFlags = if buildIde then "-lablgtkdir ${ocamlPackages.lablgtk}/lib/ocaml/*/site-lib/lablgtk2 -coqide opt" else "";
diff --git a/pkgs/applications/science/logic/z3/tptp.nix b/pkgs/applications/science/logic/z3/tptp.nix
new file mode 100644
index 000000000000..34449542abb2
--- /dev/null
+++ b/pkgs/applications/science/logic/z3/tptp.nix
@@ -0,0 +1,31 @@
+{stdenv, z3, cmake}:
+stdenv.mkDerivation rec {
+  pname = "z3-tptp";
+  version = z3.version;
+
+  src = z3.src;
+
+  sourceRoot = "source/examples/tptp";
+
+  nativeBuildInputs = [cmake];
+  buildInputs = [z3];
+
+  preConfigure = ''
+    echo 'set(Z3_LIBRARIES "-lz3")' >> CMakeLists.new
+    cat CMakeLists.txt | grep -E 'add_executable|project|link_libraries' >> CMakeLists.new
+    mv CMakeLists.new CMakeLists.txt
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp "z3_tptp5" "$out/bin/"
+    ln -s "z3_tptp5" "$out/bin/z3-tptp"
+  '';
+
+  meta = {
+    inherit version;
+    inherit (z3.meta) license homepage platforms;
+    description = ''TPTP wrapper for Z3 prover'';
+    maintainers = [stdenv.lib.maintainers.raskin];
+  };
+}