Merge pull request #21261 from vbgl/uutf-1.0.0

Eliom 6 and various OCaml package updates
This commit is contained in:
vbgl
2017-01-21 20:23:28 +01:00
committed by GitHub
20 changed files with 492 additions and 167 deletions
@@ -1,37 +1,31 @@
{ buildOcaml, stdenv, fetchurl, which, ocsigen_server, ocsigen_deriving, ocaml,
{ stdenv, fetchurl, which, ocsigen_server, ocsigen_deriving, ocaml,
js_of_ocaml, ocaml_react, ocaml_lwt, calendar, cryptokit, tyxml,
ipaddr, ocamlnet, ocaml_ssl, ocaml_pcre, ocaml_optcomp,
reactivedata, opam, ppx_tools, ppx_deriving, camlp4}:
reactivedata, opam, ppx_tools, ppx_deriving, findlib
}:
let ocamlVersion = (stdenv.lib.getVersion ocaml); in
buildOcaml rec
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
stdenv.mkDerivation rec
{
pname = "eliom";
version = "5.0.0";
version = "6.0.0";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/ocsigen/eliom/archive/${version}.tar.gz";
sha256 = "1g9wq2qpn0sgzyb6iq0h9afq5p68il4h8pc7jppqsislk87m09k7";
sha256 = "1yaqi5fdzvi2ga412chw5rk3533a3xamwfmias1crk793d43cmpc";
};
patches = [ ./camlp4.patch ];
buildInputs = [ which ocaml_optcomp opam ppx_tools camlp4 ];
buildInputs = [ ocaml which findlib ocaml_optcomp opam ppx_tools ];
propagatedBuildInputs = [ ocaml_lwt reactivedata tyxml ipaddr ocsigen_server ppx_deriving
ocsigen_deriving js_of_ocaml
calendar cryptokit ocamlnet ocaml_react ocaml_ssl ocaml_pcre ];
preConfigure = stdenv.lib.optionalString (!stdenv.lib.versionAtLeast ocamlVersion "4.02") ''
export PPX=false
'';
installPhase =
''opam-installer --script --prefix=$out ${pname}.install > install.sh
sh install.sh
ln -s $out/lib/${pname} $out/lib/ocaml/${ocamlVersion}/site-lib/
'';
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
createFindlibDestdir = true;
@@ -1,24 +1,23 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, uutf }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, uutf }:
let version = "0.9.1"; in
let version = "1.0.0"; in
stdenv.mkDerivation {
name = "ocaml-jsonm-${version}";
name = "ocaml${ocaml.version}-jsonm-${version}";
src = fetchurl {
url = "http://erratique.ch/software/jsonm/releases/jsonm-${version}.tbz";
sha256 = "0wszqrmx8iqlwzvs76fjf4sqh15mv20yjrbyhkd348yq8nhdrm1z";
sha256 = "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62";
};
buildInputs = [ ocaml findlib ocamlbuild ];
buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
propagatedBuildInputs = [ uutf ];
unpackCmd = "tar xjf $src";
configurePhase = "ocaml setup.ml -configure --prefix $prefix";
buildPhase = "ocaml setup.ml -build";
createFindlibDestdir = true;
installPhase = "ocaml setup.ml -install";
inherit (topkg) buildPhase installPhase;
meta = {
description = "An OCaml non-blocking streaming codec to decode and encode the JSON data format";
@@ -1,13 +1,13 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, uutf, lwt }:
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, uutf, lwt }:
stdenv.mkDerivation rec {
pname = "ocaml-markup";
version = "0.7.2";
name = "${pname}-${version}";
pname = "markup";
version = "0.7.4";
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchurl {
src = fetchzip {
url = "http://github.com/aantron/markup.ml/archive/${version}.tar.gz";
sha256 = "0d3wi22v7h0iqzq8dgl0g4fj2wb67gvmbzdckacifghinrx762k3";
sha256 = "1hchlqzsy9pax91gcdmxzakfm22fbvhxzwyzpvz8fqkx4372zs37";
};
buildInputs = [ ocaml findlib ocamlbuild ];
@@ -1,4 +1,4 @@
{ stdenv, buildOcaml, fetchFromGitHub, findlib
{ stdenv, buildOcaml, fetchpatch, fetchFromGitHub, findlib, topkg, opam, ocb-stubblr
, result, uucp, uuseg, uutf
, lwt ? null }:
@@ -7,7 +7,7 @@ with stdenv.lib;
let withLwt = lwt != null; in
buildOcaml rec {
version = "0.1.1";
version = "0.1.1a";
name = "notty";
minimumSupportedOcamlVersion = "4.02";
@@ -15,18 +15,23 @@ buildOcaml rec {
src = fetchFromGitHub {
owner = "pqwy";
repo = "notty";
rev = "v${version}";
sha256 = "0bw3bq8z2y1rhc20zn13s78sazywyzpg8nmyjch33p7ypxfglf01";
rev = "53f5946653490fce980dc5d8cadf8b122cff4f19";
sha256 = "0qmwb1hrp04py2i5spy0yd6c5jqxyss3wzvlkgxyl9r07kvsx6xf";
};
buildInputs = [ findlib ];
patches = [ (fetchpatch {
url = https://github.com/dbuenzli/notty/commit/b0e12930acc26d030a74d6d63d622ae220b12c92.patch;
sha256 = "0pklplbnjbsjriqj73pc8fsadg404px534w7zknz2617zb44m6x6";
})];
buildInputs = [ findlib opam topkg ocb-stubblr ];
propagatedBuildInputs = [ result uucp uuseg uutf ] ++
optional withLwt [ lwt ];
optional withLwt lwt;
configureFlags = [ "--enable-unix" ] ++
(if withLwt then ["--enable-lwt"] else ["--disable-lwt"]);
buildPhase = topkg.buildPhase
+ " --with-lwt ${if withLwt then "true" else "false"}";
configurePhase = "./configure --prefix $out $configureFlags";
inherit (topkg) installPhase;
meta = {
inherit (src.meta) homepage;
@@ -0,0 +1,26 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, opam, topkg, astring }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-ocb-stubblr-0.1.0";
src = fetchzip {
url = http://github.com/pqwy/ocb-stubblr/releases/download/v0.1.0/ocb-stubblr-0.1.0.tbz;
name = "src.tar.bz";
sha256 = "0hpds1lkq4j8wgslv7hnirgfrjmqi36h5rarpw9mwf24gfp5ays2";
};
patches = [ ./pkg-config.patch ];
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
propagatedBuildInputs = [ astring ];
inherit (topkg) buildPhase installPhase;
meta = {
description = "OCamlbuild plugin for C stubs";
homepage = https://github.com/pqwy/ocb-stubblr;
license = stdenv.lib.licenses.isc;
inherit (ocaml.meta) platforms;
maintainers = [ stdenv.lib.maintainers.vbgl ];
};
}
@@ -0,0 +1,25 @@
--- a/src/ocb_stubblr.ml 1970-01-01 00:00:01.000000000 +0000
+++ b/src/ocb_stubblr.ml 2016-12-04 11:10:10.000000000 +0000
@@ -31,20 +31,9 @@
(* XXX Would be nice to move pkg-config results to a build artefact. *)
- let opam_prefix =
- let cmd = "opam config var prefix" in
- lazy ( try run_and_read cmd with Failure _ ->
- error_msgf "error running opam")
-
- let var = "PKG_CONFIG_PATH"
-
- let path () =
- Lazy.force opam_prefix / "lib" / "pkgconfig" ::
- (try [Sys.getenv var] with Not_found -> []) |> String.concat ~sep:":"
-
let run ~flags package =
- let cmd = strf "%s=%s pkg-config %s %s 2>/dev/null"
- var (path ()) package (String.concat ~sep:" " flags) in
+ let cmd = strf "pkg-config %s %s 2>/dev/null"
+ package (String.concat ~sep:" " flags) in
try `Res (run_and_read cmd) with Failure _ -> `Nonexistent
end
@@ -9,11 +9,11 @@ let mkpath = p: n:
in
stdenv.mkDerivation {
name = "ocsigenserver-2.7";
name = "ocsigenserver-2.8";
src = fetchurl {
url = https://github.com/ocsigen/ocsigenserver/archive/2.7.tar.gz;
sha256 = "0gv9nchsx9z74hh46gn7bd0053j4694fhxriannf13sqh2qpg901";
url = https://github.com/ocsigen/ocsigenserver/archive/2.8.tar.gz;
sha256 = "1v44qv2ixd7i1qinyhlzzqiffawsdl7xhhh6ysd7lf93kh46d5sy";
};
buildInputs = [ocaml which findlib ocaml_react ocaml_ssl ocaml_lwt
@@ -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";
@@ -1,28 +1,20 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocaml_react, camlp4, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocaml_react, opam }:
let
ocamlVersion = stdenv.lib.getVersion ocaml;
in
assert stdenv.lib.versionAtLeast ocamlVersion "3.11";
assert stdenv.lib.versionAtLeast ocaml.version "3.11";
stdenv.mkDerivation {
name = "ocaml-reactiveData-0.2";
name = "ocaml${ocaml.version}-reactiveData-0.2.1";
src = fetchurl {
url = https://github.com/ocsigen/reactiveData/archive/0.2.tar.gz;
sha256 = "0rskcxnyjn8sxqnncdm6rh9wm99nha5m5sc83fywgzs64xfl43fq";
url = https://github.com/ocsigen/reactiveData/archive/0.2.1.tar.gz;
sha256 = "0wcs0z50nia1cpk8mh6i5qbc6sff9cc8x7s7q1q89d7m73bnv4vf";
};
buildInputs = [ ocaml findlib ocamlbuild opam camlp4 ];
buildInputs = [ ocaml findlib ocamlbuild opam ];
propagatedBuildInputs = [ocaml_react];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
installPhase = ''
opam-installer --script --prefix=$out reactiveData.install > install.sh
sed -i s!lib/reactiveData!lib/ocaml/${ocamlVersion}/site-lib/reactiveData! install.sh
sh install.sh
'';
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
meta = with stdenv.lib; {
description = "An OCaml module for functional reactive programming (FRP) based on React";
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-topkg-${version}";
version = "0.7.8";
version = "0.8.1";
src = fetchurl {
url = "http://erratique.ch/software/topkg/releases/topkg-${version}.tbz";
sha256 = "029lbmabczpmcgkj53mc20vmpcn3f7rf7xms4xf0nywswfzsash6";
sha256 = "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8";
};
nativeBuildInputs = [ opam ];
@@ -1,14 +1,22 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, ocaml_oasis, camlp4, uutf, markup, ppx_tools, re }:
{ stdenv, fetchzip, fetchpatch, ocaml, findlib, ocamlbuild, ocaml_oasis, camlp4, uutf, markup, ppx_tools, re
}:
assert stdenv.lib.versionAtLeast ocaml.version "4.02";
stdenv.mkDerivation rec {
pname = "tyxml";
version = "3.6.0";
name = "${pname}-${version}";
version = "4.0.1";
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchurl {
src = fetchzip {
url = "http://github.com/ocsigen/tyxml/archive/${version}.tar.gz";
sha256 = "1rz0f48x8p1m30723rn5v85pp7rd0spr04sd7gzryy99vn3ianga";
};
sha256 = "1mwkjvl78gvw7pvql5qp64cfjjca6aqsb04999qkllifyicaaq8y";
};
patches = [ (fetchpatch {
url = https://github.com/dbuenzli/tyxml/commit/a2bf5ccc0b6e684e7b81274ff19df8d72e2def8d.diff;
sha256 = "11sidgiwz3zqw815vlslbfzb456z0lndkh425mlmvnmck4d2v2i3";
})];
buildInputs = [ ocaml findlib ocamlbuild camlp4 ];
@@ -1,36 +1,31 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar }:
let
inherit (stdenv.lib) getVersion versionAtLeast;
pname = "uucp";
version = "1.1.0";
version = "2.0.0";
webpage = "http://erratique.ch/software/${pname}";
in
assert versionAtLeast (getVersion ocaml) "4.00";
assert stdenv.lib.versionAtLeast ocaml.version "4.01";
stdenv.mkDerivation {
name = "ocaml-${pname}-${version}";
name = "ocaml${ocaml.version}-${pname}-${version}";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1vm5f2ppdrnk19j0ppjiqz56qf5bzyk26gs0lz071s7iblk459jz";
sha256 = "07m7pfpcf03dqsbvqpq88y9hzic8fighlp4fgbav6n6xla35mk5k";
};
buildInputs = [ ocaml findlib ocamlbuild opam ];
buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
propagatedBuildInputs = [ uchar ];
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 = "An OCaml library providing efficient access to a selection of character properties of the Unicode character database";
@@ -1,33 +1,29 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uutf, cmdliner }:
let
pname = "uunf";
webpage = "http://erratique.ch/software/${pname}";
in
assert stdenv.lib.versionAtLeast ocaml.version "3.12";
assert stdenv.lib.versionAtLeast ocaml.version "4.01";
stdenv.mkDerivation rec {
name = "ocaml-${pname}-${version}";
version = "0.9.3";
version = "2.0.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "16cgjy1m0m61srv1pmlc3gr0y40kd4724clvpagdnz68raz4zmn0";
sha256 = "1i132168949vdc8magycgf9mdysf50vvr7zngnjl4vi3zdayq20c";
};
buildInputs = [ ocaml findlib ocamlbuild opam ];
buildInputs = [ ocaml findlib ocamlbuild opam topkg uutf cmdliner ];
propagatedBuildInputs = [ uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = "./pkg/build true false";
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) buildPhase installPhase;
meta = with stdenv.lib; {
description = "An OCaml module for normalizing Unicode text";
@@ -1,39 +1,28 @@
{ stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, uucp, uutf, cmdliner }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uucp, uutf, cmdliner }:
let
pname = "uuseg";
webpage = "http://erratique.ch/software/${pname}";
in
buildOcaml rec {
stdenv.mkDerivation rec {
minimumSupportedOcamlVersion = "4.01";
name = pname;
version = "0.9.0";
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "1.0.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "00n4zi8dyw2yzi4nr2agcrr33b0q4dr9mgnkczipf4c0gm5cm50h";
sha256 = "0m5n0kn70w862g5dhfkfvrnmb98z1r02g21ap7l81hy8sn08cbsz";
};
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ];
propagatedBuildInputs = [ uucp uutf ];
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner topkg uutf ];
propagatedBuildInputs = [ uucp uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = ''
ocaml pkg/build.ml \
native=true native-dynlink=true \
uutf=true cmdliner=true
'';
installPhase = ''
opam-installer --script --prefix=$out ${pname}.install | sh
ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/${pname}
'';
inherit (topkg) buildPhase installPhase;
meta = with stdenv.lib; {
description = "An OCaml library for segmenting Unicode text";
@@ -1,37 +1,26 @@
{ stdenv, buildOcaml, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner}:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner , topkg, uchar }:
let
pname = "uutf";
webpage = "http://erratique.ch/software/${pname}";
in
buildOcaml rec {
name = pname;
version = "0.9.4";
minimumSupportedOcamlVersion = "4.00.0";
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-${pname}-${version}";
version = "1.0.0";
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1f71fyawxal42x6g82539bv0ava2smlar6rmxxz1cyq3l0i6fw0k";
sha256 = "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37";
};
buildInputs = [ ocaml findlib ocamlbuild opam cmdliner ];
buildInputs = [ ocaml findlib ocamlbuild topkg opam cmdliner ];
propagatedBuildInputs = [ uchar ];
createFindlibDestdir = true;
unpackCmd = "tar xjf $src";
buildPhase = ''
ocaml pkg/build.ml \
native=true \
native-dynlink=true \
cmdliner=true
'';
installPhase = ''
opam-installer --prefix=$out --script ${pname}.install | sh
ln -s $out/lib/uutf $out/lib/ocaml/${ocaml.version}/site-lib/
'';
inherit (topkg) buildPhase installPhase;
meta = with stdenv.lib; {
description = "Non-blocking streaming Unicode codec for OCaml";
+14 -16
View File
@@ -1,17 +1,19 @@
{ stdenv, fetchurl, ocaml, findlib, opam, gg, uutf, otfm, js_of_ocaml,
{ stdenv, fetchurl, ocaml, findlib, opam, topkg
, uchar, result, gg, uutf, otfm, js_of_ocaml,
pdfBackend ? true, # depends on uutf and otfm
htmlcBackend ? true # depends on js_of_ocaml
}:
let
inherit (stdenv.lib) getVersion optionals versionAtLeast;
inherit (stdenv.lib) optionals versionAtLeast;
pname = "vg";
version = "0.8.1";
version = "0.9.0";
webpage = "http://erratique.ch/software/${pname}";
sob = b: if b then "true" else "false";
in
assert versionAtLeast (getVersion ocaml) "4.01.0";
assert versionAtLeast ocaml.version "4.02.0";
stdenv.mkDerivation rec {
@@ -19,12 +21,12 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "1cdcvsr5z8845ndilnrz7p4n6yn4gv2p91z2mgi4vrailcmn5vzd";
sha256 = "1czd2fq85hy24w5pllarsq4pvbx9rda5zdikxfxdng8s9kff2h3f";
};
buildInputs = [ ocaml findlib opam ];
buildInputs = [ ocaml findlib opam topkg ];
propagatedBuildInputs = [ gg ]
propagatedBuildInputs = [ uchar result gg ]
++ optionals pdfBackend [ uutf otfm ]
++ optionals htmlcBackend [ js_of_ocaml ];
@@ -32,16 +34,12 @@ stdenv.mkDerivation rec {
unpackCmd = "tar xjf $src";
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true"
+ (if pdfBackend then " uutf=true otfm=true"
else " uutf=false otfm=false")
+ (if htmlcBackend then " jsoo=true"
else " jsoo=false");
buildPhase = topkg.buildPhase
+ " --with-uutf ${sob pdfBackend} --with-otfm ${sob pdfBackend}"
+ " --with-js_of_ocaml ${sob htmlcBackend}"
+ " --with-cairo2 false";
installPhase = ''
opam-installer --script --prefix=$out ${pname}.install | sh
ln -s $out/lib/${pname} $out/lib/ocaml/${getVersion ocaml}/site-lib/${pname}
'';
inherit (topkg) installPhase;
meta = with stdenv.lib; {
description = "Declarative 2D vector graphics for OCaml";