summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2020-09-26 19:10:51 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2020-09-27 11:33:31 +0200
commit61cf0ddf29290c8b57395943b698bd85aa6f32e9 (patch)
treec0f0b6cf4bc5ae05ed8e82105a28ed2216e50d47 /pkgs/development
parent759a2815ec5b6fddb10c637fceec0f1eba88449a (diff)
downloadnixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar.gz
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar.bz2
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar.lz
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar.xz
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.tar.zst
nixpkgs-61cf0ddf29290c8b57395943b698bd85aa6f32e9.zip
ocamlPackages.topkg: 1.0.0 → 1.0.3
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/ocaml-modules/topkg/default.nix20
1 files changed, 13 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix
index d2327b93a4f..1bd926b1ddb 100644
--- a/pkgs/development/ocaml-modules/topkg/default.nix
+++ b/pkgs/development/ocaml-modules/topkg/default.nix
@@ -7,11 +7,17 @@ build system is required, the attribute `run` can be used.
 */
 { stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opaline }:
 
-if !stdenv.lib.versionAtLeast ocaml.version "4.01"
-then throw "topkg is not available for OCaml ${ocaml.version}"
-else
-
 let
+  param =
+  if stdenv.lib.versionAtLeast ocaml.version "4.03" then {
+    version = "1.0.3";
+    sha256 = "0b77gsz9bqby8v77kfi4lans47x9p2lmzanzwins5r29maphb8y6";
+  } else {
+    version = "1.0.0";
+    sha256 = "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw";
+    propagatedBuildInputs = [ result ];
+  };
+
 /* This command allows to run the “topkg” build system.
  * It is usually called with `build` or `test` as argument.
  * Packages that use `topkg` may call this command as part of
@@ -22,15 +28,15 @@ in
 
 stdenv.mkDerivation rec {
   name = "ocaml${ocaml.version}-topkg-${version}";
-  version = "1.0.0";
+  inherit (param) version;
 
   src = fetchurl {
     url = "https://erratique.ch/software/topkg/releases/topkg-${version}.tbz";
-    sha256 = "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw";
+    inherit (param) sha256;
   };
 
   nativeBuildInputs = [ ocaml findlib ocamlbuild ];
-  propagatedBuildInputs = [ result ];
+  propagatedBuildInputs = param.propagatedBuildInputs or [];
 
   buildPhase = "${run} build";
   createFindlibDestdir = true;