summary refs log tree commit diff
path: root/pkgs/development/coq-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2019-03-22 09:10:55 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2019-03-29 09:07:27 +0100
commit823107038bdc66d6868b4469fb19573ef8cd7c17 (patch)
tree00a6bb233344d029cb7803c15ad6f7803bdb5b4f /pkgs/development/coq-modules
parentdcf40f7c24eec1160e6433b6644d3e2dd268e417 (diff)
downloadnixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar.gz
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar.bz2
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar.lz
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar.xz
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.tar.zst
nixpkgs-823107038bdc66d6868b4469fb19573ef8cd7c17.zip
coqPackages.coqhammer: init at 1.1
CoqHammer is a general-purpose automated reasoning hammer tool for Coq.

Homepage: http://cl-informatik.uibk.ac.at/cek/coqhammer/
Diffstat (limited to 'pkgs/development/coq-modules')
-rw-r--r--pkgs/development/coq-modules/coqhammer/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/coq-modules/coqhammer/default.nix b/pkgs/development/coq-modules/coqhammer/default.nix
new file mode 100644
index 00000000000..28c651f9b16
--- /dev/null
+++ b/pkgs/development/coq-modules/coqhammer/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, coq }:
+
+let
+  params = {
+    "8.8" = {
+      sha256 = "0ms086wp4jmrzyglb8wymchzyflflk01nsfsk4r6qv8rrx81nx9h";
+    };
+    "8.9" = {
+      sha256 = "0hmqwsry8ldg4g4hhwg4b84dgzibpdrg1wwsajhlyqfx3fb3n3b5";
+    };
+  };
+  param = params."${coq.coq-version}";
+in
+
+stdenv.mkDerivation rec {
+  version = "1.1";
+  name = "coq${coq.coq-version}-coqhammer-${version}";
+
+  src = fetchFromGitHub {
+    owner = "lukaszcz";
+    repo = "coqhammer";
+    rev = "v${version}-coq${coq.coq-version}";
+    inherit (param) sha256;
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile.coq.local --replace \
+      '$(if $(COQBIN),$(COQBIN),`coqc -where | xargs dirname | xargs dirname`/bin/)' \
+      '$(out)/bin/'
+    substituteInPlace Makefile.coq.local --replace 'g++' 'c++' --replace 'gcc' 'cc'
+  '';
+
+  buildInputs = [ coq ] ++ (with coq.ocamlPackages; [
+    ocaml findlib camlp5
+  ]);
+
+  preInstall = ''
+    mkdir -p $out/bin
+  '';
+
+  installFlags = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ];
+
+  meta = {
+    homepage = "http://cl-informatik.uibk.ac.at/cek/coqhammer/";
+    description = "Automation for Dependent Type Theory";
+    license = stdenv.lib.licenses.lgpl21;
+    inherit (coq.meta) platforms;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+  };
+
+  passthru = {
+    compatibleCoqVersions = v: builtins.hasAttr v params;
+  };
+
+}