about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/uutf
diff options
context:
space:
mode:
authorsternenseemann <git@lukasepple.de>2016-11-03 03:02:16 +0100
committervbgl <vbgl@users.noreply.github.com>2016-11-10 09:03:43 +0100
commit840f2987d181fb8e501ac7138b9d9e8fac605820 (patch)
treef5d26748853da561445c449f7c6c18f60abe33b4 /pkgs/development/ocaml-modules/uutf
parentb15409d6f6071c6a62570c5cefe81300cbc3eb0f (diff)
downloadnixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar.gz
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar.bz2
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar.lz
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar.xz
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.tar.zst
nixlib-840f2987d181fb8e501ac7138b9d9e8fac605820.zip
ocaml-uutf: 0.9.3 -> 0.9.4
This commit also refactors the expression
Diffstat (limited to 'pkgs/development/ocaml-modules/uutf')
-rw-r--r--pkgs/development/ocaml-modules/uutf/default.nix26
1 files changed, 15 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/uutf/default.nix b/pkgs/development/ocaml-modules/uutf/default.nix
index fda630114ed6..a08e0ccbf74e 100644
--- a/pkgs/development/ocaml-modules/uutf/default.nix
+++ b/pkgs/development/ocaml-modules/uutf/default.nix
@@ -1,32 +1,36 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
+{ stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner}:
 let
   pname = "uutf";
   webpage = "http://erratique.ch/software/${pname}";
 in
 
-assert stdenv.lib.versionAtLeast ocaml.version "3.12";
+buildOcaml rec {
+  name = pname;
+  version = "0.9.4";
 
-stdenv.mkDerivation rec {
-  name = "ocaml-${pname}-${version}";
-  version = "0.9.3";
+  minimumSupportedOcamlVersion = "4.00.0";
 
   src = fetchurl {
     url = "${webpage}/releases/${pname}-${version}.tbz";
-    sha256 = "0xvq20knmq25902ijpbk91ax92bkymsqkbfklj1537hpn64lydhz";
+    sha256 = "1f71fyawxal42x6g82539bv0ava2smlar6rmxxz1cyq3l0i6fw0k";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild opam ];
+  buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ];
 
   createFindlibDestdir = true;
 
   unpackCmd = "tar xjf $src";
 
-  buildPhase = "./pkg/build true";
+  buildPhase = ''
+    ocaml pkg/build.ml \
+      native=true \
+      native-dynlink=true \
+      cmdliner=true
+  '';
 
   installPhase = ''
-    opam-installer --script --prefix=$out ${pname}.install > install.sh
-    sh install.sh
-    ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/
+    opam-installer --prefix=$out --script ${pname}.install | sh
+    ln -s $out/lib/uutf $out/lib/ocaml/${ocaml.version}/site-lib/
   '';
 
   meta = with stdenv.lib; {