summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/ocp-ocamlres/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/ocp-ocamlres/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
index bf0e98ec1952..6410eb296283 100644
--- a/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
+++ b/pkgs/development/ocaml-modules/ocp-ocamlres/default.nix
@@ -1,16 +1,20 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, pprint }:
+{ stdenv, fetchFromGitHub, ocaml, findlib, astring, pprint }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "ocp-ocamlres is not available for OCaml ${ocaml.version}"
+else
 
 stdenv.mkDerivation rec {
 	name = "ocaml${ocaml.version}-ocp-ocamlres-${version}";
-	version = "0.3";
+	version = "0.4";
 	src = fetchFromGitHub {
 		owner = "OCamlPro";
 		repo = "ocp-ocamlres";
 		rev = "v${version}";
-		sha256 = "0pm1g38f6pmch1x4pcc09ky587x5g7p7n9dfbbif8zkjqr603ixg";
+		sha256 = "0smfwrj8qhzknhzawygxi0vgl2af4vyi652fkma59rzjpvscqrnn";
 	};
 
-	buildInputs = [ ocaml findlib pprint ];
+	buildInputs = [ ocaml findlib astring pprint ];
 	createFindlibDestdir = true;
 
 	installFlags = [ "BINDIR=$(out)/bin" ];