about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-11-29 18:58:56 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2017-12-10 12:24:10 +0100
commitb1659c89c1603ee1d4128e5f38a8cf6b75e08ca8 (patch)
tree4ea04d65bbe328f5c37366865c7dc8d0bdd6b02c /pkgs/development/ocaml-modules
parent8974a9bf9adaa56621d1c48a921a6dfd5541dc40 (diff)
downloadnixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar.gz
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar.bz2
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar.lz
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar.xz
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.tar.zst
nixlib-b1659c89c1603ee1d4128e5f38a8cf6b75e08ca8.zip
ocamlPackages.ulex: 1.1 -> 1.2
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r--pkgs/development/ocaml-modules/ulex/default.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/pkgs/development/ocaml-modules/ulex/default.nix b/pkgs/development/ocaml-modules/ulex/default.nix
index fa26b305da2d..ed868c30a442 100644
--- a/pkgs/development/ocaml-modules/ulex/default.nix
+++ b/pkgs/development/ocaml-modules/ulex/default.nix
@@ -1,16 +1,26 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4 }:
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, camlp4 }:
 
 let
   pname = "ulex";
+  param =
+    if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
+      version = "1.2";
+      sha256 = "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic";
+    } else {
+      version = "1.1";
+      sha256 = "0cmscxcmcxhlshh4jd0lzw5ffzns12x3bj7h27smbc8waxkwffhl";
+    };
 in
 
 stdenv.mkDerivation rec {
-  name = "${pname}-${version}";
-  version = "1.1";
+  name = "ocaml${ocaml.version}-${pname}-${version}";
+  inherit (param) version;
 
-  src = fetchurl {
-    url = "http://www.cduce.org/download/${pname}-${version}.tar.gz";
-    sha256 = "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0";
+  src = fetchFromGitHub {
+    owner = "whitequark";
+    repo = pname;
+    rev = "v${version}";
+    inherit (param) sha256;
   };
 
   createFindlibDestdir = true;
@@ -21,7 +31,7 @@ stdenv.mkDerivation rec {
   buildFlags = "all all.opt";
 
   meta = {
-    homepage = http://www.cduce.org/download.html;
+    inherit (src.meta) homepage;
     description = "A lexer generator for Unicode and OCaml";
     license = stdenv.lib.licenses.mit;
     platforms = ocaml.meta.platforms or [];