git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #20404 from vbgl/alcotest-0.7.0

ocamlPackages.alcotest: 0.4.5 -> 0.7.2

commit376973a1bb6f57a4fee893174083b4e9f9d70c1d authorvbgl <vbgl@users.noreply.github.com> dateSat 26 Nov 2016, 16:17 (10 years ago) parent01172c2dd45d25
5 files changed+44−21
pkgs/development/ocaml-modules/alcotest/default.nix+12−6 pkgs/development/ocaml-modules/fmt/default.nix+26 pkgs/development/ocaml-modules/topkg/default.nix+3−8 pkgs/development/ocaml-modules/uucd/default.nix+1−7 pkgs/top-level/ocaml-packages.nix+2
pkgs/development/ocaml-modules/alcotest/default.nix+12−6
@@ -1,15 +1,21 @@
1−{ stdenv, buildOcaml, fetchzip, cmdliner, stringext }:
1+{ stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, opam, cmdliner, astring, fmt, result }:
22
3−buildOcaml rec {
4− name = "alcotest";
5− version = "0.4.5";
3+stdenv.mkDerivation rec {
4+ name = "ocaml${ocaml.version}-alcotest-${version}";
5+ version = "0.7.2";
66
77 src = fetchzip {
88 url = "https://github.com/mirage/alcotest/archive/${version}.tar.gz";
9− sha256 = "1wcn9hkjf4cbnrz99w940qfjpi0lvd8v63yxwpnafkff871dwk6k";
9+ sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md";
1010 };
1111
12− propagatedBuildInputs = [ cmdliner stringext ];
12+ buildInputs = [ ocaml findlib ocamlbuild opam topkg ];
13+
14+ propagatedBuildInputs = [ cmdliner astring fmt result ];
15+
16+ inherit (topkg) buildPhase installPhase;
17+
18+ createFindlibDestdir = true;
1319
1420 meta = with stdenv.lib; {
1521 homepage = https://github.com/mirage/alcotest;
pkgs/development/ocaml-modules/fmt/default.nixnew file+26
@@ -0,0 +1,26 @@
1+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, cmdliner }:
2+
3+stdenv.mkDerivation {
4+ name = "ocaml${ocaml.version}-fmt-0.8.0";
5+
6+ src = fetchurl {
7+ url = http://erratique.ch/software/fmt/releases/fmt-0.8.0.tbz;
8+ sha256 = "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px";
9+ };
10+
11+ unpackCmd = "tar xjf $src";
12+
13+ buildInputs = [ ocaml findlib ocamlbuild opam topkg cmdliner ];
14+
15+ inherit (topkg) buildPhase installPhase;
16+
17+ createFindlibDestdir = true;
18+
19+ meta = {
20+ homepage = http://erratique.ch/software/fmt;
21+ license = stdenv.lib.licenses.isc;
22+ description = "OCaml Format pretty-printer combinators";
23+ inherit (ocaml.meta) platforms;
24+ maintainers = [ stdenv.lib.maintainers.vbgl ];
25+ };
26+}
pkgs/development/ocaml-modules/topkg/default.nix+3−8
@@ -1,9 +1,7 @@
11{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }:
22
3−let ocaml-version = stdenv.lib.getVersion ocaml; in
4−
53stdenv.mkDerivation rec {
6− name = "ocaml${ocaml-version}-topkg-${version}";
4+ name = "ocaml${ocaml.version}-topkg-${version}";
75 version = "0.7.8";
86
97 src = fetchurl {
@@ -16,12 +14,9 @@ stdenv.mkDerivation rec {
1614 propagatedBuildInputs = [ result ];
1715
1816 unpackCmd = "tar xjf ${src}";
19− buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml-version}/site-lib/ pkg/pkg.ml build";
17+ buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build";
2018 createFindlibDestdir = true;
21− installPhase = ''
22− opam-installer --script --prefix=$out topkg.install | sh
23− mv $out/lib/topkg $out/lib/ocaml/${ocaml-version}/site-lib/
24− '';
19+ installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
2520
2621 meta = {
2722 homepage = http://erratique.ch/software/topkg;
pkgs/development/ocaml-modules/uucd/default.nix+1−7
@@ -19,13 +19,7 @@ stdenv.mkDerivation rec {
1919
2020 unpackCmd = "tar xjf $src";
2121
22− inherit (topkg) buildPhase;
23−
24− installPhase = ''
25− opam-installer --script --prefix=$out ${pname}.install > install.sh
26− sh install.sh
27− ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/
28− '';
22+ inherit (topkg) buildPhase installPhase;
2923
3024 propagatedBuildInputs = [ xmlm ];
3125
pkgs/top-level/ocaml-packages.nix+2
@@ -176,6 +176,8 @@ let
176176
177177 fix = callPackage ../development/ocaml-modules/fix { };
178178
179+ fmt = callPackage ../development/ocaml-modules/fmt { };
180+
179181 fontconfig = callPackage ../development/ocaml-modules/fontconfig {
180182 inherit (pkgs) fontconfig;
181183 };