From bf1723a89b6d98ed64a935695b1b7ae39cd11696 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 4 Dec 2016 10:16:35 +0000 Subject: [PATCH] ocamlPackages.otfm: 0.2.0 -> 0.3.0 --- .../ocaml-modules/otfm/default.nix | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkgs/development/ocaml-modules/otfm/default.nix b/pkgs/development/ocaml-modules/otfm/default.nix index 30946da1c0b2..5deef60520bd 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";