ocamlPackages.otfm: 0.2.0 -> 0.3.0

This commit is contained in:
Vincent Laporte 2016-12-04 10:16:35 +00:00
parent 221f20413d
commit bf1723a89b

View File

@ -1,14 +1,12 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, uutf }: { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uutf, result }:
let let
inherit (stdenv.lib) getVersion versionAtLeast;
pname = "otfm"; pname = "otfm";
version = "0.2.0"; version = "0.3.0";
webpage = "http://erratique.ch/software/${pname}"; webpage = "http://erratique.ch/software/${pname}";
in in
assert versionAtLeast (getVersion ocaml) "4.01.0"; assert stdenv.lib.versionAtLeast ocaml.version "4.01.0";
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
@ -16,23 +14,18 @@ stdenv.mkDerivation rec {
src = fetchurl { src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz"; 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; createFindlibDestdir = true;
unpackCmd = "tar xjf $src"; unpackCmd = "tar xjf $src";
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"; inherit (topkg) buildPhase installPhase;
installPhase = ''
opam-installer --script --prefix=$out ${pname}.install | sh
ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "OpenType font decoder for OCaml"; description = "OpenType font decoder for OCaml";