summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/labltk/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/labltk/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/labltk/default.nix26
1 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/labltk/default.nix b/pkgs/development/ocaml-modules/labltk/default.nix
index 0677202fab9..e7b68b90713 100644
--- a/pkgs/development/ocaml-modules/labltk/default.nix
+++ b/pkgs/development/ocaml-modules/labltk/default.nix
@@ -7,13 +7,13 @@ then throw "labltk is not available for OCaml ${ocaml.version}"
 else
 
 let param =
-if OCamlVersionAtLeast "4.08" then rec {
-  version = "8.06.7";
-  src = fetchzip {
-    url = "https://github.com/garrigue/labltk/archive/${version}.tar.gz";
-    sha256 = "1cqnxjv2dvw9csiz4iqqyx6rck04jgylpglk8f69kgybf7k7xk2h";
-  };
-} else
+  let mkNewParam = { version, sha256 }: {
+    inherit version;
+    src = fetchzip {
+      url = "https://github.com/garrigue/labltk/archive/${version}.tar.gz";
+      inherit sha256;
+    };
+  }; in
   let mkOldParam = { version, key, sha256 }: {
     src = fetchurl {
       url = "https://forge.ocamlcore.org/frs/download.php/${key}/labltk-${version}.tar.gz";
@@ -21,7 +21,7 @@ if OCamlVersionAtLeast "4.08" then rec {
     };
     inherit version;
   }; in
- {
+ rec {
   "4.04" = mkOldParam {
     version = "8.06.2";
     key = "1628";
@@ -42,6 +42,16 @@ if OCamlVersionAtLeast "4.08" then rec {
     key = "1764";
     sha256 = "0wgx65y1wkgf22ihpqmspqfp95fqbj3pldhp1p3b1mi8rmc37zwj";
   };
+  _8_06_7 = mkNewParam {
+    version = "8.06.7";
+    sha256 = "1cqnxjv2dvw9csiz4iqqyx6rck04jgylpglk8f69kgybf7k7xk2h";
+  };
+  "4.08" = _8_06_7;
+  "4.09" = _8_06_7;
+  "4.10" = mkNewParam {
+    version = "8.06.8";
+    sha256 = "0lfjc7lscq81ibqb3fcybdzs2r1i2xl7rsgi7linq46a0pcpkinw";
+  };
 }.${builtins.substring 0 4 ocaml.version};
 in