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

ocamlPackages.topkg: refactoring

authored by Orivej Desh and committed by GitHub e7d4784a 3ddca57d

+105 -161
+4 -5
pkgs/applications/networking/instant-messengers/jackline/default.nix
··· 1 - {stdenv, fetchFromGitHub, ocamlPackages, opam}: 2 3 assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2"; 4 ··· 16 buildInputs = with ocamlPackages; [ 17 ocaml ocamlbuild findlib topkg ppx_sexp_conv 18 erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring 19 - ptime notty sexplib_p4 hex uutf opam 20 ]; 21 22 - buildPhase = with ocamlPackages; 23 - "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build --pinned true"; 24 25 - installPhase = "opam-installer --prefix=$out --script | sh"; 26 27 meta = with stdenv.lib; { 28 homepage = https://github.com/hannesm/jackline;
··· 1 + { stdenv, fetchFromGitHub, ocamlPackages }: 2 3 assert stdenv.lib.versionAtLeast ocamlPackages.ocaml.version "4.02.2"; 4 ··· 16 buildInputs = with ocamlPackages; [ 17 ocaml ocamlbuild findlib topkg ppx_sexp_conv 18 erm_xmpp_0_3 tls nocrypto x509 ocaml_lwt otr astring 19 + ptime notty sexplib_p4 hex uutf 20 ]; 21 22 + buildPhase = "${ocamlPackages.topkg.run} build --pinned true"; 23 24 + inherit (ocamlPackages.topkg) installPhase; 25 26 meta = with stdenv.lib; { 27 homepage = https://github.com/hannesm/jackline;
+2 -2
pkgs/development/ocaml-modules/alcotest/default.nix
··· 1 - { stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, opam, jbuilder 2 , cmdliner, astring, fmt, result 3 }: 4 ··· 12 } else { 13 version = "0.7.2"; 14 sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md"; 15 - buildInputs = [ ocamlbuild opam topkg ]; 16 inherit (topkg) buildPhase installPhase; 17 }; 18 in
··· 1 + { stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, jbuilder 2 , cmdliner, astring, fmt, result 3 }: 4 ··· 12 } else { 13 version = "0.7.2"; 14 sha256 = "1qgsz2zz5ky6s5pf3j3shc4fjc36rqnjflk8x0wl1fcpvvkr52md"; 15 + buildInputs = [ ocamlbuild topkg ]; 16 inherit (topkg) buildPhase installPhase; 17 }; 18 in
+5 -10
pkgs/development/ocaml-modules/asn1-combinators/default.nix
··· 1 - { stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg, opam }: 2 - 3 - let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in 4 5 buildOcaml rec { 6 name = "asn1-combinators"; ··· 15 sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj"; 16 }; 17 18 - buildInputs = [ ocaml findlib ounit topkg opam ]; 19 propagatedBuildInputs = [ result cstruct zarith ]; 20 21 createFindlibDestdir = true; 22 23 - buildPhase = "ocaml ${ocamlFlags} pkg/pkg.ml build --tests true"; 24 25 - installPhase = '' 26 - opam-installer --script --prefix=$out | sh 27 - ln -s $out/lib/asn1-combinators $out/lib/ocaml/${ocaml.version}/site-lib 28 - ''; 29 30 doCheck = true; 31 - checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test"; 32 33 meta = { 34 homepage = https://github.com/mirleft/ocaml-asn1-combinators;
··· 1 + { stdenv, buildOcaml, fetchFromGitHub, ocaml, findlib, cstruct, zarith, ounit, result, topkg }: 2 3 buildOcaml rec { 4 name = "asn1-combinators"; ··· 13 sha256 = "0hpn049i46sdnv2i6m7r6m6ch0jz8argybh71wykbvcqdby08zxj"; 14 }; 15 16 + buildInputs = [ ocaml findlib ounit topkg ]; 17 propagatedBuildInputs = [ result cstruct zarith ]; 18 19 createFindlibDestdir = true; 20 21 + buildPhase = "${topkg.run} build --tests true"; 22 23 + inherit (topkg) installPhase; 24 25 doCheck = true; 26 + checkPhase = "${topkg.run} test"; 27 28 meta = { 29 homepage = https://github.com/mirleft/ocaml-asn1-combinators;
+3 -10
pkgs/development/ocaml-modules/astring/default.nix
··· 1 - {stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, opam}: 2 3 buildOcaml rec { 4 version = "0.8.3"; ··· 11 12 unpackCmd = "tar -xf $curSrc"; 13 14 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 15 16 - buildPhase = '' 17 - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build 18 - ''; 19 - 20 - installPhase = '' 21 - opam-installer --script --prefix=$out astring.install | sh 22 - ln -s $out/lib/astring $out/lib/ocaml/${ocaml.version}/site-lib/ 23 - ''; 24 25 meta = { 26 homepage = http://erratique.ch/software/astring;
··· 1 + { stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }: 2 3 buildOcaml rec { 4 version = "0.8.3"; ··· 11 12 unpackCmd = "tar -xf $curSrc"; 13 14 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 15 16 + inherit (topkg) buildPhase installPhase; 17 18 meta = { 19 homepage = http://erratique.ch/software/astring;
+2 -2
pkgs/development/ocaml-modules/bos/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg 2 , astring, fmt, fpath, logs, rresult 3 }: 4 ··· 12 13 unpackCmd = "tar xjf $src"; 14 15 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 16 propagatedBuildInputs = [ astring fmt fpath logs rresult ]; 17 18 inherit (topkg) buildPhase installPhase;
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg 2 , astring, fmt, fpath, logs, rresult 3 }: 4 ··· 12 13 unpackCmd = "tar xjf $src"; 14 15 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 16 propagatedBuildInputs = [ astring fmt fpath logs rresult ]; 17 18 inherit (topkg) buildPhase installPhase;
+3 -12
pkgs/development/ocaml-modules/cmdliner/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }: 2 3 let 4 pname = "cmdliner"; ··· 17 18 unpackCmd = "tar xjf $src"; 19 20 - nativeBuildInputs = [ ocamlbuild opam topkg ]; 21 buildInputs = [ ocaml findlib ]; 22 propagatedBuildInputs = [ result ]; 23 24 - createFindlibDestdir = true; 25 - 26 - buildPhase = '' 27 - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build 28 - ''; 29 - 30 - installPhase = '' 31 - opam-installer --script --prefix=$out | sh 32 - ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/ 33 - ''; 34 35 meta = with stdenv.lib; { 36 homepage = http://erratique.ch/software/cmdliner;
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, result }: 2 3 let 4 pname = "cmdliner"; ··· 17 18 unpackCmd = "tar xjf $src"; 19 20 + nativeBuildInputs = [ ocamlbuild topkg ]; 21 buildInputs = [ ocaml findlib ]; 22 propagatedBuildInputs = [ result ]; 23 24 + inherit (topkg) buildPhase installPhase; 25 26 meta = with stdenv.lib; { 27 homepage = http://erratique.ch/software/cmdliner;
+2 -4
pkgs/development/ocaml-modules/cow/default.nix
··· 1 { stdenv, fetchFromGitHub, ocaml, findlib 2 - , ocamlbuild, topkg, opam 3 , uri, xmlm, omd, ezjsonm }: 4 5 stdenv.mkDerivation rec { ··· 13 sha256 = "0snhabg7rfrrcq2ksr3qghiawd61cw3y4kp6rl7vs87j4cnk3kr2"; 14 }; 15 16 - createFindlibDestdir = true; 17 - 18 - buildInputs = [ ocaml opam ocamlbuild findlib topkg ]; 19 propagatedBuildInputs = [ xmlm uri ezjsonm omd ]; 20 21 inherit (topkg) buildPhase installPhase;
··· 1 { stdenv, fetchFromGitHub, ocaml, findlib 2 + , ocamlbuild, topkg 3 , uri, xmlm, omd, ezjsonm }: 4 5 stdenv.mkDerivation rec { ··· 13 sha256 = "0snhabg7rfrrcq2ksr3qghiawd61cw3y4kp6rl7vs87j4cnk3kr2"; 14 }; 15 16 + buildInputs = [ ocaml ocamlbuild findlib topkg ]; 17 propagatedBuildInputs = [ xmlm uri ezjsonm omd ]; 18 19 inherit (topkg) buildPhase installPhase;
+2 -2
pkgs/development/ocaml-modules/cpuid/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, ocb-stubblr }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-cpuid-0.1.0"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ocb-stubblr ]; 14 15 inherit (topkg) buildPhase installPhase; 16
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ocb-stubblr }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-cpuid-0.1.0"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg ocb-stubblr ]; 14 15 inherit (topkg) buildPhase installPhase; 16
+2 -2
pkgs/development/ocaml-modules/decompress/default.nix
··· 1 - { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, opam 2 }: 3 4 if !stdenv.lib.versionAtLeast ocaml.version "4.03" ··· 16 sha256 = "0hfs5zrvimzvjwdg57vrxx9bb7irvlm07dk2yv3s5qhj30zimd08"; 17 }; 18 19 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 20 21 inherit (topkg) buildPhase installPhase; 22
··· 1 + { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg 2 }: 3 4 if !stdenv.lib.versionAtLeast ocaml.version "4.03" ··· 16 sha256 = "0hfs5zrvimzvjwdg57vrxx9bb7irvlm07dk2yv3s5qhj30zimd08"; 17 }; 18 19 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 20 21 inherit (topkg) buildPhase installPhase; 22
+2 -4
pkgs/development/ocaml-modules/fmt/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, cmdliner, result, uchar }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-fmt-0.8.4"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 - buildInputs = [ ocaml findlib ocamlbuild opam topkg cmdliner ]; 14 propagatedBuildInputs = [ result uchar ]; 15 16 inherit (topkg) buildPhase installPhase; 17 - 18 - createFindlibDestdir = true; 19 20 meta = { 21 homepage = http://erratique.ch/software/fmt;
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner, result, uchar }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-fmt-0.8.4"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; 14 propagatedBuildInputs = [ result uchar ]; 15 16 inherit (topkg) buildPhase installPhase; 17 18 meta = { 19 homepage = http://erratique.ch/software/fmt;
+2 -2
pkgs/development/ocaml-modules/fpath/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, astring }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-fpath-0.7.2"; ··· 9 10 unpackCmd = "tar xjf $src"; 11 12 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 13 14 propagatedBuildInputs = [ astring ]; 15
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, astring }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-fpath-0.7.2"; ··· 9 10 unpackCmd = "tar xjf $src"; 11 12 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 13 14 propagatedBuildInputs = [ astring ]; 15
+2 -2
pkgs/development/ocaml-modules/functoria/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg 2 , bos, cmdliner, ocamlgraph 3 }: 4 ··· 15 16 unpackCmd = "tar xjf $src"; 17 18 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 19 propagatedBuildInputs = [ bos cmdliner ocamlgraph ]; 20 21 inherit (topkg) buildPhase installPhase;
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg 2 , bos, cmdliner, ocamlgraph 3 }: 4 ··· 15 16 unpackCmd = "tar xjf $src"; 17 18 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 19 propagatedBuildInputs = [ bos cmdliner ocamlgraph ]; 20 21 inherit (topkg) buildPhase installPhase;
+2 -2
pkgs/development/ocaml-modules/integers/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-integers-0.2.2"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 14 15 inherit (topkg) buildPhase installPhase; 16
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-integers-0.2.2"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 14 15 inherit (topkg) buildPhase installPhase; 16
+2 -4
pkgs/development/ocaml-modules/jsonm/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, uutf }: 2 3 let version = "1.0.1"; in 4 ··· 10 sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"; 11 }; 12 13 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 14 propagatedBuildInputs = [ uutf ]; 15 16 unpackCmd = "tar xjf $src"; 17 - 18 - createFindlibDestdir = true; 19 20 inherit (topkg) buildPhase installPhase; 21
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf }: 2 3 let version = "1.0.1"; in 4 ··· 10 sha256 = "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"; 11 }; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 14 propagatedBuildInputs = [ uutf ]; 15 16 unpackCmd = "tar xjf $src"; 17 18 inherit (topkg) buildPhase installPhase; 19
+3 -8
pkgs/development/ocaml-modules/logs/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam 2 , topkg, result, lwt, cmdliner, fmt }: 3 let 4 pname = "logs"; ··· 18 19 unpackCmd = "tar xjf $src"; 20 21 - buildInputs = [ ocaml findlib ocamlbuild opam topkg fmt cmdliner lwt ]; 22 propagatedBuildInputs = [ result ]; 23 24 - buildPhase = '' 25 - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build \ 26 - --with-js_of_ocaml false 27 - ''; 28 29 inherit (topkg) installPhase; 30 - 31 - createFindlibDestdir = true; 32 33 meta = with stdenv.lib; { 34 description = "Logging infrastructure for OCaml";
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild 2 , topkg, result, lwt, cmdliner, fmt }: 3 let 4 pname = "logs"; ··· 18 19 unpackCmd = "tar xjf $src"; 20 21 + buildInputs = [ ocaml findlib ocamlbuild topkg fmt cmdliner lwt ]; 22 propagatedBuildInputs = [ result ]; 23 24 + buildPhase = "${topkg.run} build --with-js_of_ocaml false"; 25 26 inherit (topkg) installPhase; 27 28 meta = with stdenv.lib; { 29 description = "Logging infrastructure for OCaml";
+2 -2
pkgs/development/ocaml-modules/mtime/default.nix
··· 1 - { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, js_of_ocaml 2 , jsooSupport ? true 3 }: 4 ··· 25 26 unpackCmd = "tar xjf $src"; 27 28 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ] 29 ++ stdenv.lib.optional jsooSupport js_of_ocaml; 30 31 buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}";
··· 1 + { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, js_of_ocaml 2 , jsooSupport ? true 3 }: 4 ··· 25 26 unpackCmd = "tar xjf $src"; 27 28 + buildInputs = [ ocaml findlib ocamlbuild topkg ] 29 ++ stdenv.lib.optional jsooSupport js_of_ocaml; 30 31 buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}";
+2 -4
pkgs/development/ocaml-modules/nocrypto/default.nix
··· 1 - { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg 2 , cpuid, ocb-stubblr 3 , cstruct, zarith, ppx_sexp_conv, sexplib 4 , cstruct-lwt ? null ··· 18 sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p"; 19 }; 20 21 - buildInputs = [ ocaml findlib ocamlbuild topkg opam cpuid ocb-stubblr 22 ppx_sexp_conv ]; 23 propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt cstruct-lwt; 24 ··· 27 ${topkg.buildPhase} --with-lwt ${boolToString withLwt} 28 ''; 29 inherit (topkg) installPhase; 30 - 31 - createFindlibDestdir = true; 32 33 meta = { 34 homepage = https://github.com/mirleft/ocaml-nocrypto;
··· 1 + { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg 2 , cpuid, ocb-stubblr 3 , cstruct, zarith, ppx_sexp_conv, sexplib 4 , cstruct-lwt ? null ··· 18 sha256 = "0nhnlpbqh3mf9y2cxivlvfb70yfbdpvg6jslzq64xblpgjyg443p"; 19 }; 20 21 + buildInputs = [ ocaml findlib ocamlbuild topkg cpuid ocb-stubblr 22 ppx_sexp_conv ]; 23 propagatedBuildInputs = [ cstruct zarith sexplib ] ++ optional withLwt cstruct-lwt; 24 ··· 27 ${topkg.buildPhase} --with-lwt ${boolToString withLwt} 28 ''; 29 inherit (topkg) installPhase; 30 31 meta = { 32 homepage = https://github.com/mirleft/ocaml-nocrypto;
+2 -2
pkgs/development/ocaml-modules/notty/default.nix
··· 1 - { stdenv, buildOcaml, fetchpatch, fetchFromGitHub, findlib, topkg, opam, ocb-stubblr 2 , result, uucp, uuseg, uutf 3 , lwt ? null }: 4 ··· 24 sha256 = "0pklplbnjbsjriqj73pc8fsadg404px534w7zknz2617zb44m6x6"; 25 })]; 26 27 - buildInputs = [ findlib opam topkg ocb-stubblr ]; 28 propagatedBuildInputs = [ result uucp uuseg uutf ] ++ 29 optional withLwt lwt; 30
··· 1 + { stdenv, buildOcaml, fetchpatch, fetchFromGitHub, findlib, topkg, ocb-stubblr 2 , result, uucp, uuseg, uutf 3 , lwt ? null }: 4 ··· 24 sha256 = "0pklplbnjbsjriqj73pc8fsadg404px534w7zknz2617zb44m6x6"; 25 })]; 26 27 + buildInputs = [ findlib topkg ocb-stubblr ]; 28 propagatedBuildInputs = [ result uucp uuseg uutf ] ++ 29 optional withLwt lwt; 30
+2 -2
pkgs/development/ocaml-modules/ocb-stubblr/default.nix
··· 1 - { stdenv, fetchzip, ocaml, findlib, ocamlbuild, opam, topkg, astring }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-ocb-stubblr-0.1.0"; ··· 10 11 patches = [ ./pkg-config.patch ]; 12 13 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 14 15 propagatedBuildInputs = [ astring ]; 16
··· 1 + { stdenv, fetchzip, ocaml, findlib, ocamlbuild, topkg, astring }: 2 3 stdenv.mkDerivation { 4 name = "ocaml${ocaml.version}-ocb-stubblr-0.1.0"; ··· 10 11 patches = [ ./pkg-config.patch ]; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 14 15 propagatedBuildInputs = [ astring ]; 16
+2 -2
pkgs/development/ocaml-modules/octavius/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam }: 2 3 if !stdenv.lib.versionAtLeast ocaml.version "4.03" 4 then throw "octavius is not available for OCaml ${ocaml.version}" else ··· 12 13 unpackCmd = "tar xjf $src"; 14 15 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 16 17 inherit (topkg) buildPhase installPhase; 18
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 3 if !stdenv.lib.versionAtLeast ocaml.version "4.03" 4 then throw "octavius is not available for OCaml ${ocaml.version}" else ··· 12 13 unpackCmd = "tar xjf $src"; 14 15 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 16 17 inherit (topkg) buildPhase installPhase; 18
+2 -4
pkgs/development/ocaml-modules/otfm/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uutf, result }: 2 3 let 4 pname = "otfm"; ··· 17 sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k"; 18 }; 19 20 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 21 22 propagatedBuildInputs = [ uutf result ]; 23 - 24 - createFindlibDestdir = true; 25 26 unpackCmd = "tar xjf $src"; 27
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uutf, result }: 2 3 let 4 pname = "otfm"; ··· 17 sha256 = "054s82539k3kc9na6s47g3scsl04icjahpas7pv5351jmsgqcq3k"; 18 }; 19 20 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 21 22 propagatedBuildInputs = [ uutf result ]; 23 24 unpackCmd = "tar xjf $src"; 25
+7 -16
pkgs/development/ocaml-modules/otr/default.nix
··· 1 - {stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml, opam, 2 - ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, result, nocrypto, astring}: 3 - 4 - let ocamlFlags = "-I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/"; in 5 6 buildOcaml rec { 7 name = "otr"; ··· 16 sha256 = "07zzix5mfsasqpqdx811m0x04gp8mq1ayf4b64998k98027v01rr"; 17 }; 18 19 - buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv opam ppx_cstruct ]; 20 propagatedBuildInputs = [ cstruct sexplib result nocrypto astring ]; 21 22 - buildPhase = '' 23 - ocaml ${ocamlFlags} pkg/pkg.ml build \ 24 - --tests true 25 - ''; 26 27 - installPhase = '' 28 - opam-installer --prefix=$out --script | sh 29 - ln -s $out/lib/otr $out/lib/ocaml/${ocaml.version}/site-lib 30 - ''; 31 32 doCheck = true; 33 - checkPhase = "ocaml ${ocamlFlags} pkg/pkg.ml test"; 34 - 35 - createFindlibDestdir = true; 36 37 meta = with stdenv.lib; { 38 homepage = https://github.com/hannesm/ocaml-otr;
··· 1 + { stdenv, buildOcaml, fetchFromGitHub, ocamlbuild, findlib, topkg, ocaml 2 + , ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, result, nocrypto, astring 3 + }: 4 5 buildOcaml rec { 6 name = "otr"; ··· 15 sha256 = "07zzix5mfsasqpqdx811m0x04gp8mq1ayf4b64998k98027v01rr"; 16 }; 17 18 + buildInputs = [ ocamlbuild findlib topkg ppx_tools ppx_sexp_conv ppx_cstruct ]; 19 propagatedBuildInputs = [ cstruct sexplib result nocrypto astring ]; 20 21 + buildPhase = "${topkg.run} build --tests true"; 22 23 + inherit (topkg) installPhase; 24 25 doCheck = true; 26 + checkPhase = "${topkg.run} test"; 27 28 meta = with stdenv.lib; { 29 homepage = https://github.com/hannesm/ocaml-otr;
+2 -2
pkgs/development/ocaml-modules/ppx_deriving_yojson/default.nix
··· 1 - { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, opam, topkg, cppo 2 , ppx_import, ppx_deriving, yojson, ounit 3 }: 4 ··· 13 sha256 = "1pwfnq7z60nchba4gnf58918ll11w3gj5i88qhz1p2jm45hxqgnw"; 14 }; 15 16 - buildInputs = [ ocaml findlib ocamlbuild opam cppo ounit ppx_import ]; 17 18 propagatedBuildInputs = [ ppx_deriving yojson ]; 19
··· 1 + { stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, topkg, cppo 2 , ppx_import, ppx_deriving, yojson, ounit 3 }: 4 ··· 13 sha256 = "1pwfnq7z60nchba4gnf58918ll11w3gj5i88qhz1p2jm45hxqgnw"; 14 }; 15 16 + buildInputs = [ ocaml findlib ocamlbuild cppo ounit ppx_import ]; 17 18 propagatedBuildInputs = [ ppx_deriving yojson ]; 19
+3 -5
pkgs/development/ocaml-modules/ptime/default.nix
··· 1 - { stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, result, opam, js_of_ocaml }: 2 3 buildOcaml rec { 4 version = "0.8.3"; ··· 11 12 unpackCmd = "tar -xf $curSrc"; 13 14 - buildInputs = [ ocaml findlib ocamlbuild topkg opam js_of_ocaml ]; 15 16 propagatedBuildInputs = [ result ]; 17 18 - buildPhase = '' 19 - ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build --with-js_of_ocaml true 20 - ''; 21 22 inherit (topkg) installPhase; 23
··· 1 + { stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, result, js_of_ocaml }: 2 3 buildOcaml rec { 4 version = "0.8.3"; ··· 11 12 unpackCmd = "tar -xf $curSrc"; 13 14 + buildInputs = [ ocaml findlib ocamlbuild topkg js_of_ocaml ]; 15 16 propagatedBuildInputs = [ result ]; 17 18 + buildPhase = "${topkg.run} build --with-js_of_ocaml true"; 19 20 inherit (topkg) installPhase; 21
+2 -4
pkgs/development/ocaml-modules/react/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild, opam }: 2 3 stdenv.mkDerivation { 4 name = "ocaml-react-1.2.1"; ··· 9 }; 10 11 unpackCmd = "tar xjf $src"; 12 - buildInputs = [ ocaml findlib topkg ocamlbuild opam ]; 13 - 14 - createFindlibDestdir = true; 15 16 inherit (topkg) buildPhase installPhase; 17
··· 1 + { stdenv, fetchurl, ocaml, findlib, topkg, ocamlbuild }: 2 3 stdenv.mkDerivation { 4 name = "ocaml-react-1.2.1"; ··· 9 }; 10 11 unpackCmd = "tar xjf $src"; 12 + buildInputs = [ ocaml findlib topkg ocamlbuild ]; 13 14 inherit (topkg) buildPhase installPhase; 15
+2 -2
pkgs/development/ocaml-modules/rresult/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }: 2 3 stdenv.mkDerivation rec { 4 name = "ocaml${ocaml.version}-rresult-${version}"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 - buildInputs = [ ocaml findlib ocamlbuild topkg opam ]; 14 15 inherit (topkg) buildPhase installPhase; 16
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 3 stdenv.mkDerivation rec { 4 name = "ocaml${ocaml.version}-rresult-${version}"; ··· 10 11 unpackCmd = "tar xjf $src"; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 14 15 inherit (topkg) buildPhase installPhase; 16
+20 -3
pkgs/development/ocaml-modules/topkg/default.nix
··· 1 { stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }: 2 3 if !stdenv.lib.versionAtLeast ocaml.version "4.01" 4 then throw "topkg is not available for OCaml ${ocaml.version}" 5 else 6 7 stdenv.mkDerivation rec { 8 name = "ocaml${ocaml.version}-topkg-${version}"; 9 version = "0.9.1"; ··· 13 sha256 = "1slrzbmyp81xhgsfwwqs2d6gxzvqx0gcp34rq00h5iblhcq7myx6"; 14 }; 15 16 - nativeBuildInputs = [ opam ]; 17 buildInputs = [ ocaml findlib ocamlbuild ]; 18 propagatedBuildInputs = [ result ]; 19 20 unpackCmd = "tar xjf ${src}"; 21 - buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build"; 22 createFindlibDestdir = true; 23 - installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR"; 24 25 meta = { 26 homepage = http://erratique.ch/software/topkg;
··· 1 + /* Topkg is a packager for distributing OCaml software. This derivation 2 + provides facilities to describe derivations for OCaml libraries 3 + using topkg. 4 + The `buildPhase` and `installPhase` attributes can be reused directly 5 + in many cases. When more fine-grained control on how to run the “topkg” 6 + build system is required, the attribute `run` can be used. 7 + */ 8 { stdenv, fetchurl, ocaml, findlib, ocamlbuild, result, opam }: 9 10 if !stdenv.lib.versionAtLeast ocaml.version "4.01" 11 then throw "topkg is not available for OCaml ${ocaml.version}" 12 else 13 14 + let 15 + /* This command allows to run the “topkg” build system. 16 + * It is usually called with `build` or `test` as argument. 17 + * Packages that use `topkg` may call this command as part of 18 + * their `buildPhase` or `checkPhase`. 19 + */ 20 + run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml"; 21 + in 22 + 23 stdenv.mkDerivation rec { 24 name = "ocaml${ocaml.version}-topkg-${version}"; 25 version = "0.9.1"; ··· 29 sha256 = "1slrzbmyp81xhgsfwwqs2d6gxzvqx0gcp34rq00h5iblhcq7myx6"; 30 }; 31 32 buildInputs = [ ocaml findlib ocamlbuild ]; 33 propagatedBuildInputs = [ result ]; 34 35 unpackCmd = "tar xjf ${src}"; 36 + buildPhase = "${run} build"; 37 createFindlibDestdir = true; 38 + installPhase = "${opam}/bin/opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR"; 39 + 40 + passthru = { inherit run; }; 41 42 meta = { 43 homepage = http://erratique.ch/software/topkg;
+2 -4
pkgs/development/ocaml-modules/tsdl/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, opam, ocb-stubblr }: 2 3 if !stdenv.lib.versionAtLeast ocaml.version "4.02" 4 then throw "tsdl is not available for OCaml ${ocaml.version}" ··· 19 }; 20 21 nativeBuildInputs = [ pkgconfig ]; 22 - buildInputs = [ ocaml findlib ocamlbuild topkg result opam ocb-stubblr ]; 23 propagatedBuildInputs = [ SDL2 ctypes ]; 24 - 25 - createFindlibDestdir = true; 26 27 unpackCmd = "tar xjf $src"; 28
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }: 2 3 if !stdenv.lib.versionAtLeast ocaml.version "4.02" 4 then throw "tsdl is not available for OCaml ${ocaml.version}" ··· 19 }; 20 21 nativeBuildInputs = [ pkgconfig ]; 22 + buildInputs = [ ocaml findlib ocamlbuild topkg result ocb-stubblr ]; 23 propagatedBuildInputs = [ SDL2 ctypes ]; 24 25 unpackCmd = "tar xjf $src"; 26
+2 -4
pkgs/development/ocaml-modules/uucd/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, xmlm, topkg }: 2 3 let 4 pname = "uucd"; ··· 13 sha256 = "0cdyg6vaic4n58w80qriwvaq1c40ng3fh74ilxrwajbq163k055q"; 14 }; 15 16 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 17 - 18 - createFindlibDestdir = true; 19 20 unpackCmd = "tar xjf $src"; 21
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, xmlm, topkg }: 2 3 let 4 pname = "uucd"; ··· 13 sha256 = "0cdyg6vaic4n58w80qriwvaq1c40ng3fh74ilxrwajbq163k055q"; 14 }; 15 16 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 17 18 unpackCmd = "tar xjf $src"; 19
+2 -4
pkgs/development/ocaml-modules/uucp/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uutf, uunf }: 2 3 let 4 pname = "uucp"; ··· 17 sha256 = "0qgbrx3lnrzii8a9f0hv4kp73y57q6fr79hskxxxs70q68j2xpfm"; 18 }; 19 20 - buildInputs = [ ocaml findlib ocamlbuild opam topkg uutf uunf ]; 21 22 propagatedBuildInputs = [ uchar ]; 23 - 24 - createFindlibDestdir = true; 25 26 unpackCmd = "tar xjf $src"; 27
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, uunf }: 2 3 let 4 pname = "uucp"; ··· 17 sha256 = "0qgbrx3lnrzii8a9f0hv4kp73y57q6fr79hskxxxs70q68j2xpfm"; 18 }; 19 20 + buildInputs = [ ocaml findlib ocamlbuild topkg uutf uunf ]; 21 22 propagatedBuildInputs = [ uchar ]; 23 24 unpackCmd = "tar xjf $src"; 25
+2 -4
pkgs/development/ocaml-modules/uuidm/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, cmdliner }: 2 3 stdenv.mkDerivation rec { 4 version = "0.9.6"; ··· 10 11 unpackCmd = "tar -xf $curSrc"; 12 13 - buildInputs = [ ocaml findlib ocamlbuild topkg opam cmdliner ]; 14 15 inherit (topkg) buildPhase installPhase; 16 - 17 - createFindlibDestdir = true; 18 19 meta = with stdenv.lib; { 20 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";
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }: 2 3 stdenv.mkDerivation rec { 4 version = "0.9.6"; ··· 10 11 unpackCmd = "tar -xf $curSrc"; 12 13 + buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; 14 15 inherit (topkg) buildPhase installPhase; 16 17 meta = with stdenv.lib; { 18 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";
+2 -4
pkgs/development/ocaml-modules/uunf/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uutf, cmdliner }: 2 let 3 pname = "uunf"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 15 sha256 = "0c5lwica5668ybsffllk6x4p921nw4pljimgqikhf17k5hvyjsbr"; 16 }; 17 18 - buildInputs = [ ocaml findlib ocamlbuild opam topkg uutf cmdliner ]; 19 20 propagatedBuildInputs = [ uchar ]; 21 - 22 - createFindlibDestdir = true; 23 24 unpackCmd = "tar xjf $src"; 25
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uutf, cmdliner }: 2 let 3 pname = "uunf"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 15 sha256 = "0c5lwica5668ybsffllk6x4p921nw4pljimgqikhf17k5hvyjsbr"; 16 }; 17 18 + buildInputs = [ ocaml findlib ocamlbuild topkg uutf cmdliner ]; 19 20 propagatedBuildInputs = [ uchar ]; 21 22 unpackCmd = "tar xjf $src"; 23
+2 -4
pkgs/development/ocaml-modules/uuseg/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, uchar, uucp, uutf, cmdliner }: 2 3 let 4 pname = "uuseg"; ··· 15 sha256 = "01q8ljjgi7d73x7ms489b5my83xds4jax1vbjhwwjdai01friscc"; 16 }; 17 18 - buildInputs = [ ocaml findlib ocamlbuild opam cmdliner topkg uutf ]; 19 propagatedBuildInputs = [ uucp uchar ]; 20 - 21 - createFindlibDestdir = true; 22 23 unpackCmd = "tar xjf $src"; 24
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, uchar, uucp, uutf, cmdliner }: 2 3 let 4 pname = "uuseg"; ··· 15 sha256 = "01q8ljjgi7d73x7ms489b5my83xds4jax1vbjhwwjdai01friscc"; 16 }; 17 18 + buildInputs = [ ocaml findlib ocamlbuild cmdliner topkg uutf ]; 19 propagatedBuildInputs = [ uucp uchar ]; 20 21 unpackCmd = "tar xjf $src"; 22
+2 -4
pkgs/development/ocaml-modules/uutf/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, cmdliner , topkg, uchar }: 2 let 3 pname = "uutf"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 13 sha256 = "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"; 14 }; 15 16 - buildInputs = [ ocaml findlib ocamlbuild topkg opam cmdliner ]; 17 propagatedBuildInputs = [ uchar ]; 18 - 19 - createFindlibDestdir = true; 20 21 unpackCmd = "tar xjf $src"; 22
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, cmdliner , topkg, uchar }: 2 let 3 pname = "uutf"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 13 sha256 = "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"; 14 }; 15 16 + buildInputs = [ ocaml findlib ocamlbuild topkg cmdliner ]; 17 propagatedBuildInputs = [ uchar ]; 18 19 unpackCmd = "tar xjf $src"; 20
+2 -4
pkgs/development/ocaml-modules/vg/default.nix
··· 1 - { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg 2 , uchar, result, gg, uutf, otfm 3 , js_of_ocaml, js_of_ocaml-ocamlbuild, js_of_ocaml-ppx, 4 pdfBackend ? true, # depends on uutf and otfm ··· 26 sha256 = "1czd2fq85hy24w5pllarsq4pvbx9rda5zdikxfxdng8s9kff2h3f"; 27 }; 28 29 - buildInputs = [ ocaml findlib ocamlbuild opam topkg ]; 30 31 propagatedBuildInputs = [ uchar result gg ] 32 ++ optionals pdfBackend [ uutf otfm ] 33 ++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ocamlbuild js_of_ocaml-ppx ]; 34 - 35 - createFindlibDestdir = true; 36 37 unpackCmd = "tar xjf $src"; 38
··· 1 + { stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg 2 , uchar, result, gg, uutf, otfm 3 , js_of_ocaml, js_of_ocaml-ocamlbuild, js_of_ocaml-ppx, 4 pdfBackend ? true, # depends on uutf and otfm ··· 26 sha256 = "1czd2fq85hy24w5pllarsq4pvbx9rda5zdikxfxdng8s9kff2h3f"; 27 }; 28 29 + buildInputs = [ ocaml findlib ocamlbuild topkg ]; 30 31 propagatedBuildInputs = [ uchar result gg ] 32 ++ optionals pdfBackend [ uutf otfm ] 33 ++ optionals htmlcBackend [ js_of_ocaml js_of_ocaml-ocamlbuild js_of_ocaml-ppx ]; 34 35 unpackCmd = "tar xjf $src"; 36
+3 -10
pkgs/development/ocaml-modules/xmlm/default.nix
··· 1 - { stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg }: 2 let 3 pname = "xmlm"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 30 inherit (param) sha256; 31 }; 32 33 - buildInputs = [ ocaml findlib ocamlbuild opam ] ++ param.buildInputs; 34 - 35 - createFindlibDestdir = true; 36 37 unpackCmd = "tar xjf $src"; 38 39 inherit (param) buildPhase; 40 - 41 - installPhase = '' 42 - opam-installer --script --prefix=$out ${pname}.install > install.sh 43 - sh install.sh 44 - ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/ 45 - ''; 46 47 meta = with stdenv.lib; { 48 description = "An OCaml streaming codec to decode and encode the XML data format";
··· 1 + { stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: 2 let 3 pname = "xmlm"; 4 webpage = "http://erratique.ch/software/${pname}"; ··· 30 inherit (param) sha256; 31 }; 32 33 + buildInputs = [ ocaml findlib ocamlbuild ] ++ param.buildInputs; 34 35 unpackCmd = "tar xjf $src"; 36 37 inherit (param) buildPhase; 38 + inherit (topkg) installPhase; 39 40 meta = with stdenv.lib; { 41 description = "An OCaml streaming codec to decode and encode the XML data format";