ocaml-uuseg: 0.8.0 -> 0.9.0

This commit also refactors the expression.
This commit is contained in:
sternenseemann 2016-11-03 03:03:04 +01:00
parent 21a191df74
commit 18788cbac7

View File

@ -1,40 +1,39 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, uucp, uutf, cmdliner }: { stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, uucp, uutf, cmdliner }:
let let
inherit (stdenv.lib) getVersion versionAtLeast;
pname = "uuseg"; pname = "uuseg";
version = "0.8.0";
webpage = "http://erratique.ch/software/${pname}"; webpage = "http://erratique.ch/software/${pname}";
in in
assert versionAtLeast (getVersion ocaml) "4.01"; buildOcaml rec {
stdenv.mkDerivation { minimumSupportedOcamlVersion = "4.01";
name = "ocaml-${pname}-${version}"; name = pname;
version = "0.9.0";
src = fetchurl { src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz"; url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "00n4zi8dyw2yzi4nr2agcrr33b0q4dr9mgnkczipf4c0gm5cm50h"; sha256 = "00n4zi8dyw2yzi4nr2agcrr33b0q4dr9mgnkczipf4c0gm5cm50h";
}; };
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ]; buildInputs = [ ocaml findlib ocamlbuild opam ];
propagatedBuildInputs = [ uucp uutf ]; propagatedBuildInputs = [ uucp uutf cmdliner ];
createFindlibDestdir = true; createFindlibDestdir = true;
unpackCmd = "tar xjf $src"; unpackCmd = "tar xjf $src";
buildPhase = '' buildPhase = ''
ocaml pkg/git.ml
ocaml pkg/build.ml \ ocaml pkg/build.ml \
native=true native-dynlink=true \ native=true native-dynlink=true \
uutf=true cmdliner=true uutf=true cmdliner=true
''; '';
installPhase = '' installPhase = ''
opam-installer --script --prefix=$out ${pname}.install | sh opam-installer --prefix $out --script | sh
ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname} ln -s $out/lib/uuseg $out/lib/ocaml/${ocaml.version}/site-lib/
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {