summary refs log tree commit diff
path: root/pkgs/development/coq-modules/ssreflect/default.nix
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-01-25 07:41:25 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-01-25 13:06:11 +0000
commit42bf99ef443f4f59e1972b42116407279c312e58 (patch)
tree2785524b86d29e48e2f6158ab46665ae46226328 /pkgs/development/coq-modules/ssreflect/default.nix
parent635ac15845b3759244c09a922e0d41c4929f6d61 (diff)
downloadnixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar.gz
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar.bz2
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar.lz
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar.xz
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.tar.zst
nixlib-42bf99ef443f4f59e1972b42116407279c312e58.zip
coqPackages.{ssreflect,mathcomp}: fix build with Coq-8.6
by adding `findlib` as a build input.

Also clean `default.nix` a little bit.
Diffstat (limited to 'pkgs/development/coq-modules/ssreflect/default.nix')
-rw-r--r--pkgs/development/coq-modules/ssreflect/default.nix45
1 files changed, 14 insertions, 31 deletions
diff --git a/pkgs/development/coq-modules/ssreflect/default.nix b/pkgs/development/coq-modules/ssreflect/default.nix
index 16147c4dc2ae..18eafe5e9c2c 100644
--- a/pkgs/development/coq-modules/ssreflect/default.nix
+++ b/pkgs/development/coq-modules/ssreflect/default.nix
@@ -1,39 +1,22 @@
 { callPackage, fetchurl, coq }:
 
-if coq.coq-version == "8.4" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6-${coq.coq-version}";
-  src = fetchurl {
+let param =
+  let v16 = {
+    version = "1.6";
     url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
     sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.5" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6-${coq.coq-version}";
-  src = fetchurl {
-    url = http://ssr.msr-inria.inria.fr/FTP/mathcomp-1.6.tar.gz;
-    sha256 = "0adr556032r1jkvphbpfvrrv041qk0yqb7a1xnbam52ji0mdl2w8";
-  };
-
-}
-
-else if coq.coq-version == "8.6" then
-
-callPackage ./generic.nix {
-
-  name = "coq-ssreflect-1.6.1-${coq.coq-version}";
-  src = fetchurl {
+  }; v161 = {
+    version = "1.6.1";
     url = https://github.com/math-comp/math-comp/archive/mathcomp-1.6.1.tar.gz;
     sha256 = "1j9ylggjzrxz1i2hdl2yhsvmvy5z6l4rprwx7604401080p5sgjw";
-  };
+  }; in
+{
+  "8.4" = v16;
+  "8.5" = v16;
+  "8.6" = v161;
+}."${coq.coq-version}"; in
 
+callPackage ./generic.nix {
+  name = "coq${coq.coq-version}-ssreflect-${param.version}";
+  src = fetchurl { inherit (param) url sha256; };
 }
-
-else throw "No ssreflect package for Coq version ${coq.coq-version}"