summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/otfm
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2016-12-04 10:16:35 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-01-13 06:38:08 +0000
commitbf1723a89b6d98ed64a935695b1b7ae39cd11696 (patch)
treea3b8225388266bc3139c1c09151445f2820b9216 /pkgs/development/ocaml-modules/otfm
parent221f20413d4efe044f939f0af2c0851c58a2420b (diff)
downloadnixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar.gz
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar.bz2
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar.lz
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar.xz
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.tar.zst
nixpkgs-bf1723a89b6d98ed64a935695b1b7ae39cd11696.zip
ocamlPackages.otfm: 0.2.0 -> 0.3.0
Diffstat (limited to 'pkgs/development/ocaml-modules/otfm')
-rw-r--r--pkgs/development/ocaml-modules/otfm/default.nix21
1 files changed, 7 insertions, 14 deletions
diff --git a/pkgs/development/ocaml-modules/otfm/default.nix b/pkgs/development/ocaml-modules/otfm/default.nix
index 30946da1c0b..5deef60520b 100644
--- a/pkgs/development/ocaml-modules/otfm/default.nix
+++ b/pkgs/development/ocaml-modules/otfm/default.nix
@@ -1,14 +1,12 @@
-{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, uutf }:
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uutf, result }:
 
 let
-  inherit (stdenv.lib) getVersion versionAtLeast;
-
   pname = "otfm";
-  version = "0.2.0";
+  version = "0.3.0";
   webpage = "http://erratique.ch/software/${pname}";
 in
 
-assert versionAtLeast (getVersion ocaml) "4.01.0";
+assert stdenv.lib.versionAtLeast ocaml.version "4.01.0";
 
 stdenv.mkDerivation rec {
 
@@ -16,23 +14,18 @@ stdenv.mkDerivation rec {
 
   src = fetchurl {
     url = "${webpage}/releases/${pname}-${version}.tbz";
-    sha256 = "1wgi9plf98gd7x3b7fzjxds089sivsap97bl1bw2lj73nxwnyb9c";
+    sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k";
   };
 
-  buildInputs = [ ocaml findlib ocamlbuild opam ];
+  buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
 
-  propagatedBuildInputs = [ uutf ];
+  propagatedBuildInputs = [ uutf result ];
 
   createFindlibDestdir = true;
 
   unpackCmd = "tar xjf $src";
 
-  buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
-
-  installPhase = ''
-    opam-installer --script --prefix=$out ${pname}.install | sh
-    ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
-  '';
+  inherit (topkg) buildPhase installPhase;
 
   meta = with stdenv.lib; {
     description = "OpenType font decoder for OCaml";