summary refs log tree commit diff
path: root/pkgs/development/coq-modules/HoTT
diff options
context:
space:
mode:
authorLangston Barrett <langston.barrett@gmail.com>2017-09-21 23:08:34 +0000
committervbgl <vbgl@users.noreply.github.com>2017-10-11 02:51:16 +0200
commit48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d (patch)
tree2b43a2a3cf4c014728e94bafcea42b34a0818e26 /pkgs/development/coq-modules/HoTT
parente509f6ffdf609fcf7754097fbbba9514517329e5 (diff)
downloadnixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar.gz
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar.bz2
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar.lz
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar.xz
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.tar.zst
nixpkgs-48a49fc12e0b6e28c46fcb0a7c52bac26f8bc05d.zip
coqPackages.HoTT: init at 20170921
Diffstat (limited to 'pkgs/development/coq-modules/HoTT')
-rw-r--r--pkgs/development/coq-modules/HoTT/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/pkgs/development/coq-modules/HoTT/default.nix b/pkgs/development/coq-modules/HoTT/default.nix
new file mode 100644
index 00000000000..cb77ac3deac
--- /dev/null
+++ b/pkgs/development/coq-modules/HoTT/default.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchFromGitHub, autoconf, automake, coq }:
+
+if !stdenv.lib.versionAtLeast coq.coq-version "8.6"
+then throw "This version of HoTT requires Coq 8.6"
+else stdenv.mkDerivation rec {
+  name = "coq${coq.coq-version}-HoTT-${version}";
+  version = "20170921";
+
+  src = fetchFromGitHub {
+    owner = "HoTT";
+    repo = "HoTT";
+    rev = "e3557740a699167e6adb1a65855509d55a392fa1";
+    sha256 = "0zwfp8g62b50vmmbb2kmskj3v6w7qx1pbf43yw0hr7asdz2zbx5v";
+  };
+
+  buildInputs = [ autoconf automake coq ];
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+    patchShebangs ./autogen.sh
+    ./autogen.sh
+
+    mkdir -p "$out/bin"
+  '';
+
+  configureFlags = [
+    "--bindir=$(out)/bin"
+  ];
+
+  patchPhase = ''
+    patchShebangs etc
+    patchShebangs hoqc hoqchk hoqdep hoqide hoqtop
+  '';
+
+  postBuild = ''
+    patchShebangs hoq-config
+  '';
+
+  # Currently, all the scripts like hoqc and hoqtop assume that the *.vo files are
+  # either (1) in the same directory as the scripts, or (2) in /usr/share/hott.
+  # We fulfill (1), which means that these files are only accessible via hoqtop,
+  # hoqc, etc and not via coqtop, coqc, etc.
+  postInstall = ''
+    mv $out/share/hott/* "$out/bin"
+    rmdir $out/share/hott
+    rmdir $out/share
+  '';
+
+  installFlags = [
+    "COQBIN=${coq}/bin"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage = http://homotopytypetheory.org/;
+    description = "Homotopy type theory";
+    maintainers = with maintainers; [ siddharthist ];
+    platforms = coq.meta.platforms;
+  };
+}