Merge pull request #32680 from vbgl/ocaml-topkg-cleanup

ocamlPackages.topkg: refactoring
This commit is contained in:
Orivej Desh 2017-12-15 17:35:35 +00:00 committed by GitHub
commit e7d4784a6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 105 additions and 161 deletions

View File

@ -1,4 +1,4 @@
{stdenv, fetchFromGitHub, ocamlPackages, opam}:
{ stdenv, fetchFromGitHub, ocamlPackages }:
assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2";
@ -16,13 +16,12 @@ stdenv.mkDerivation rec {
buildInputs = with ocamlPackages; [
ocaml ocamlbuild findlib topkg ppx_sexp_conv
erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring
ptime notty sexplib_p4 hex uutf opam
ptime notty sexplib_p4 hex uutf
];
buildPhase = with ocamlPackages;
"ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build --pinned true";
buildPhase = "${ocamlPackages.topkg.run} build --pinned true";
installPhase = "opam-installer --prefix=$out --script | sh";
inherit (ocamlPackages.topkg) installPhase;
meta = with stdenv.lib; {
homepage = https://github.com/hannesm/jackline;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, opam, jbuilder
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, jbuilder
, cmdliner, astring, fmt, result
}:
@ -12,7 +12,7 @@ let param =
} else {
version = "0.7.2";
sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md";
buildInputs = [ ocamlbuild opam topkg ];
buildInputs = [ ocamlbuild topkg ];
inherit (topkg) buildPhase installPhase;
};
in

View File

@ -1,6 +1,4 @@
{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg, opam }:
let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in
{ stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg }:
buildOcaml rec {
name = "asn1-combinators";
@ -15,20 +13,17 @@ buildOcaml rec {
sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj";
};
buildInputs = [ ocaml findlib ounit topkg opam ];
buildInputs = [ ocaml findlib ounit topkg ];
propagatedBuildInputs = [ result cstruct zarith ];
createFindlibDestdir = true;
buildPhase = "ocaml ${ocamlFlags} pkg/pkg.ml build --tests true";
buildPhase = "${topkg.run} build --tests true";
installPhase = ''
opam-installer --script --prefix=$out | sh
ln -s $out/lib/asn1-combinators $out/lib/ocaml/${ocaml.version}/site-lib
'';
inherit (topkg) installPhase;
doCheck = true;
checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test";
checkPhase = "${topkg.run} test";
meta = {
homepage = https://github.com/mirleft/ocaml-asn1-combinators;

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, opam}:
{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }:
buildOcaml rec {
version = "0.8.3";
@ -11,16 +11,9 @@ buildOcaml rec {
unpackCmd = "tar -xf $curSrc";
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
buildPhase = ''
ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build
'';
installPhase = ''
opam-installer --script --prefix=$out astring.install | sh
ln -s $out/lib/astring $out/lib/ocaml/${ocaml.version}/site-lib/
'';
inherit (topkg) buildPhase installPhase;
meta = {
homepage = http://erratique.ch/software/astring;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
, astring, fmt, fpath, logs, rresult
}:
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ astring fmt fpath logs rresult ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }:
let
pname = "cmdliner";
@ -17,20 +17,11 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
nativeBuildInputs = [ ocamlbuild opam topkg ];
nativeBuildInputs = [ ocamlbuild topkg ];
buildInputs = [ ocaml findlib ];
propagatedBuildInputs = [ result ];
createFindlibDestdir = true;
buildPhase = ''
ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build
'';
installPhase = ''
opam-installer --script --prefix=$out | sh
ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/
'';
inherit (topkg) buildPhase installPhase;
meta = with stdenv.lib; {
homepage = http://erratique.ch/software/cmdliner;

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, ocaml, findlib
, ocamlbuild, topkg, opam
, ocamlbuild, topkg
, uri, xmlm, omd, ezjsonm }:
stdenv.mkDerivation rec {
@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "0snhabg7rfrrcq2ksr3qghiawd61cw3y4kp6rl7vs87j4cnk3kr2";
};
createFindlibDestdir = true;
buildInputs = [ ocaml opam ocamlbuild findlib topkg ];
buildInputs = [ ocaml ocamlbuild findlib topkg ];
propagatedBuildInputs = [ xmlm uri ezjsonm omd ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, ocb-stubblr }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-cpuid-0.1.0";
@ -10,7 +10,7 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg ocb-stubblr ];
buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, opam
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
}:
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
sha256 = "0hfs5zrvimzvjwdg57vrxx9bb7irvlm07dk2yv3s5qhj30zimd08";
};
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, cmdliner, result, uchar }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, result, uchar }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-fmt-0.8.4";
@ -10,13 +10,11 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg cmdliner ];
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
propagatedBuildInputs = [ result uchar ];
inherit (topkg) buildPhase installPhase;
createFindlibDestdir = true;
meta = {
homepage = http://erratique.ch/software/fmt;
license = stdenv.lib.licenses.isc;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, astring }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, astring }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-fpath-0.7.2";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ astring ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg
, bos, cmdliner, ocamlgraph
}:
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ bos cmdliner ocamlgraph ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-integers-0.2.2";
@ -10,7 +10,7 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, uutf }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }:
let version = "1.0.1"; in
@ -10,13 +10,11 @@ stdenv.mkDerivation {
sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w";
};
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ uutf ];
unpackCmd = "tar xjf $src";
createFindlibDestdir = true;
inherit (topkg) buildPhase installPhase;
meta = {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild
, topkg, result, lwt, cmdliner, fmt }:
let
pname = "logs";
@ -18,18 +18,13 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg fmt cmdliner lwt ];
buildInputs = [ ocaml findlib ocamlbuild topkg fmt cmdliner lwt ];
propagatedBuildInputs = [ result ];
buildPhase = ''
ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build \
--with-js_of_ocaml false
'';
buildPhase = "${topkg.run} build --with-js_of_ocaml false";
inherit (topkg) installPhase;
createFindlibDestdir = true;
meta = with stdenv.lib; {
description = "Logging infrastructure for OCaml";
homepage = "${webpage}";

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, js_of_ocaml
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml
, jsooSupport ? true
}:
@ -25,7 +25,7 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild opam topkg ]
buildInputs = [ ocaml findlib ocamlbuild topkg ]
++ stdenv.lib.optional jsooSupport js_of_ocaml;
buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg
, cpuid, ocb-stubblr
, cstruct, zarith, ppx_sexp_conv, sexplib
, cstruct-lwt ? null
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p";
};
buildInputs = [ ocaml findlib ocamlbuild topkg opam cpuid ocb-stubblr
buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr
ppx_sexp_conv ];
propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt cstruct-lwt;
@ -28,8 +28,6 @@ stdenv.mkDerivation rec {
'';
inherit (topkg) installPhase;
createFindlibDestdir = true;
meta = {
homepage = https://github.com/mirleft/ocaml-nocrypto;
description = "Simplest possible crypto to support TLS";

View File

@ -1,4 +1,4 @@
{ stdenv, buildOcaml, fetchpatch, fetchFromGitHub, findlib, topkg, opam, ocb-stubblr
{ stdenv, buildOcaml, fetchpatch, fetchFromGitHub, findlib, topkg, ocb-stubblr
, result, uucp, uuseg, uutf
, lwt ? null }:
@ -24,7 +24,7 @@ buildOcaml rec {
sha256 = "0pklplbnjbsjriqj73pc8fsadg404px534w7zknz2617zb44m6x6";
})];
buildInputs = [ findlib opam topkg ocb-stubblr ];
buildInputs = [ findlib topkg ocb-stubblr ];
propagatedBuildInputs = [ result uucp uuseg uutf ] ++
optional withLwt lwt;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, opam, topkg, astring }:
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, astring }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-ocb-stubblr-0.1.0";
@ -10,7 +10,7 @@ stdenv.mkDerivation {
patches = [ ./pkg-config.patch ];
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ astring ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "octavius is not available for OCaml ${ocaml.version}" else
@ -12,7 +12,7 @@ stdenv.mkDerivation {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uutf, result }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf, result }:
let
pname = "otfm";
@ -17,12 +17,10 @@ stdenv.mkDerivation rec {
sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k";
};
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ uutf result ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
inherit (topkg) buildPhase installPhase;

View File

@ -1,7 +1,6 @@
{stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml, opam,
ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, result, nocrypto, astring}:
let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in
{ stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml
, ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, result, nocrypto, astring
}:
buildOcaml rec {
name = "otr";
@ -16,23 +15,15 @@ buildOcaml rec {
sha256 = "07zzix5mfsasqpqdx811m0x04gp8mq1ayf4b64998k98027v01rr";
};
buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv opam ppx_cstruct ];
buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv ppx_cstruct ];
propagatedBuildInputs = [ cstruct sexplib result nocrypto astring ];
buildPhase = ''
ocaml ${ocamlFlags} pkg/pkg.ml build \
--tests true
'';
buildPhase = "${topkg.run} build --tests true";
installPhase = ''
opam-installer --prefix=$out --script | sh
ln -s $out/lib/otr $out/lib/ocaml/${ocaml.version}/site-lib
'';
inherit (topkg) installPhase;
doCheck = true;
checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test";
createFindlibDestdir = true;
checkPhase = "${topkg.run} test";
meta = with stdenv.lib; {
homepage = https://github.com/hannesm/ocaml-otr;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg, cppo
{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, cppo
, ppx_import, ppx_deriving, yojson, ounit
}:
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "1pwfnq7z60nchba4gnf58918ll11w3gj5i88qhz1p2jm45hxqgnw";
};
buildInputs = [ ocaml findlib ocamlbuild opam cppo ounit ppx_import ];
buildInputs = [ ocaml findlib ocamlbuild cppo ounit ppx_import ];
propagatedBuildInputs = [ ppx_deriving yojson ];

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, result, opam, js_of_ocaml }:
{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml }:
buildOcaml rec {
version = "0.8.3";
@ -11,13 +11,11 @@ buildOcaml rec {
unpackCmd = "tar -xf $curSrc";
buildInputs = [ ocaml findlib ocamlbuild topkg opam js_of_ocaml ];
buildInputs = [ ocaml findlib ocamlbuild topkg js_of_ocaml ];
propagatedBuildInputs = [ result ];
buildPhase = ''
ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build --with-js_of_ocaml true
'';
buildPhase = "${topkg.run} build --with-js_of_ocaml true";
inherit (topkg) installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild, opam }:
{ stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }:
stdenv.mkDerivation {
name = "ocaml-react-1.2.1";
@ -9,9 +9,7 @@ stdenv.mkDerivation {
};
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib topkg ocamlbuild opam ];
createFindlibDestdir = true;
buildInputs = [ ocaml findlib topkg ocamlbuild ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-rresult-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
inherit (topkg) buildPhase installPhase;

View File

@ -1,9 +1,25 @@
/* Topkg is a packager for distributing OCaml software. This derivation
provides facilities to describe derivations for OCaml libraries
using topkg.
The `buildPhase` and `installPhase` attributes can be reused directly
in many cases. When more fine-grained control on how to run the topkg
build system is required, the attribute `run` can be used.
*/
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }:
if !stdenv.lib.versionAtLeast ocaml.version "4.01"
then throw "topkg is not available for OCaml ${ocaml.version}"
else
let
/* This command allows to run the topkg build system.
* It is usually called with `build` or `test` as argument.
* Packages that use `topkg` may call this command as part of
* their `buildPhase` or `checkPhase`.
*/
run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml";
in
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-topkg-${version}";
version = "0.9.1";
@ -13,14 +29,15 @@ stdenv.mkDerivation rec {
sha256 = "1slrzbmyp81xhgsfwwqs2d6gxzvqx0gcp34rq00h5iblhcq7myx6";
};
nativeBuildInputs = [ opam ];
buildInputs = [ ocaml findlib ocamlbuild ];
propagatedBuildInputs = [ result ];
unpackCmd = "tar xjf ${src}";
buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build";
buildPhase = "${run} build";
createFindlibDestdir = true;
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
installPhase = "${opam}/bin/opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
passthru = { inherit run; };
meta = {
homepage = http://erratique.ch/software/topkg;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, opam, ocb-stubblr }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "tsdl is not available for OCaml ${ocaml.version}"
@ -19,11 +19,9 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib ocamlbuild topkg result opam ocb-stubblr ];
buildInputs = [ ocaml findlib ocamlbuild topkg result ocb-stubblr ];
propagatedBuildInputs = [ SDL2 ctypes ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
preConfigure = ''

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, xmlm, topkg }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, xmlm, topkg }:
let
pname = "uucd";
@ -13,9 +13,7 @@ stdenv.mkDerivation rec {
sha256 = "0cdyg6vaic4n58w80qriwvaq1c40ng3fh74ilxrwajbq163k055q";
};
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
createFindlibDestdir = true;
buildInputs = [ ocaml findlib ocamlbuild topkg ];
unpackCmd = "tar xjf $src";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uutf, uunf }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, uunf }:
let
pname = "uucp";
@ -17,12 +17,10 @@ stdenv.mkDerivation {
sha256 = "0qgbrx3lnrzii8a9f0hv4kp73y57q6fr79hskxxxs70q68j2xpfm";
};
buildInputs = [ ocaml findlib ocamlbuild opam topkg uutf uunf ];
buildInputs = [ ocaml findlib ocamlbuild topkg uutf uunf ];
propagatedBuildInputs = [ uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = "${topkg.buildPhase} --with-cmdliner false";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, cmdliner }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
stdenv.mkDerivation rec {
version = "0.9.6";
@ -10,12 +10,10 @@ stdenv.mkDerivation rec {
unpackCmd = "tar -xf $curSrc";
buildInputs = [ ocaml findlib ocamlbuild topkg opam cmdliner ];
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
inherit (topkg) buildPhase installPhase;
createFindlibDestdir = true;
meta = with stdenv.lib; {
description = "An OCaml module implementing 128 bits universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122";
homepage = http://erratique.ch/software/uuidm;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uutf, cmdliner }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner }:
let
pname = "uunf";
webpage = "http://erratique.ch/software/${pname}";
@ -15,12 +15,10 @@ stdenv.mkDerivation rec {
sha256 = "0c5lwica5668ybsffllk6x4p921nw4pljimgqikhf17k5hvyjsbr";
};
buildInputs = [ ocaml findlib ocamlbuild opam topkg uutf cmdliner ];
buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner ];
propagatedBuildInputs = [ uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uucp, uutf, cmdliner }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uucp, uutf, cmdliner }:
let
pname = "uuseg";
@ -15,11 +15,9 @@ stdenv.mkDerivation rec {
sha256 = "01q8ljjgi7d73x7ms489b5my83xds4jax1vbjhwwjdai01friscc";
};
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner topkg uutf ];
buildInputs = [ ocaml findlib ocamlbuild cmdliner topkg uutf ];
propagatedBuildInputs = [ uucp uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner , topkg, uchar }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }:
let
pname = "uutf";
webpage = "http://erratique.ch/software/${pname}";
@ -13,11 +13,9 @@ stdenv.mkDerivation rec {
sha256 = "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj";
};
buildInputs = [ ocaml findlib ocamlbuild topkg opam cmdliner ];
buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ];
propagatedBuildInputs = [ uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
inherit (topkg) buildPhase installPhase;

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg
{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg
, uchar, result, gg, uutf, otfm
, js_of_ocaml, js_of_ocaml-ocamlbuild, js_of_ocaml-ppx,
pdfBackend ? true, # depends on uutf and otfm
@ -26,14 +26,12 @@ stdenv.mkDerivation rec {
sha256 = "1czd2fq85hy24w5pllarsq4pvbx9rda5zdikxfxdng8s9kff2h3f";
};
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ uchar result gg ]
++ optionals pdfBackend [ uutf otfm ]
++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ocamlbuild js_of_ocaml-ppx ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = topkg.buildPhase

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
let
pname = "xmlm";
webpage = "http://erratique.ch/software/${pname}";
@ -30,19 +30,12 @@ stdenv.mkDerivation rec {
inherit (param) sha256;
};
buildInputs = [ ocaml findlib ocamlbuild opam ] ++ param.buildInputs;
createFindlibDestdir = true;
buildInputs = [ ocaml findlib ocamlbuild ] ++ param.buildInputs;
unpackCmd = "tar xjf $src";
inherit (param) buildPhase;
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/
'';
inherit (topkg) installPhase;
meta = with stdenv.lib; {
description = "An OCaml streaming codec to decode and encode the XML data format";