diff options
Diffstat (limited to 'pkgs/development/ocaml-modules')
4 files changed, 55 insertions, 17 deletions
diff --git a/pkgs/development/ocaml-modules/lablgtk3/default.nix b/pkgs/development/ocaml-modules/lablgtk3/default.nix index e8e890bd85ada..9f2227327e49e 100644 --- a/pkgs/development/ocaml-modules/lablgtk3/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk3/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, pkgconfig, ocaml, findlib, gtk3, gtkspell3, gtksourceview }: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" +if !stdenv.lib.versionAtLeast ocaml.version "4.05" then throw "lablgtk3 is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { - version = "3.0.beta2"; + version = "3.0.beta3"; name = "ocaml${ocaml.version}-lablgtk3-${version}"; src = fetchurl { - url = https://forge.ocamlcore.org/frs/download.php/1774/lablgtk-3.0.beta2.tar.gz; - sha256 = "1v4qj07l75hqis4j9bx8x1cfn7scqi6nmp4j5jx41x94ws7hp2ch"; + url = https://forge.ocamlcore.org/frs/download.php/1775/lablgtk-3.0.beta3.tar.gz; + sha256 = "174mwwdz1s91a6ycbas7nc0g87c2l6zqv68zi5ab33yb76l46a6w"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/ocaml-modules/resource-pooling/default.nix b/pkgs/development/ocaml-modules/resource-pooling/default.nix new file mode 100644 index 0000000000000..71f2d51060cfe --- /dev/null +++ b/pkgs/development/ocaml-modules/resource-pooling/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, lwt_log }: + +let pname = "resource-pooling"; in + +if !stdenv.lib.versionAtLeast ocaml.version "4.06" +then throw "${pname} is not available for OCaml ${ocaml.version}" +else + +stdenv.mkDerivation rec { + version = "0.5.2"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = pname; + rev = version; + sha256 = "00rz1i61w2dy108hzv38rblnsv6b56b5a1mk5h3zddpivcljp2dh"; + }; + + buildInputs = [ ocaml findlib ocamlbuild ]; + propagatedBuildInputs = [ lwt_log ]; + + configurePhase = "ocaml setup.ml -configure --prefix $out"; + buildPhase = "ocaml setup.ml -build"; + createFindlibDestdir = true; + installPhase = "ocaml setup.ml -install"; + + meta = { + inherit (src.meta) homepage; + inherit (ocaml.meta) platforms; + description = "A library for pooling resources like connections, threads, or similar"; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/development/ocaml-modules/rope/default.nix b/pkgs/development/ocaml-modules/rope/default.nix index 4353c606d6187..b797af0a702aa 100644 --- a/pkgs/development/ocaml-modules/rope/default.nix +++ b/pkgs/development/ocaml-modules/rope/default.nix @@ -3,9 +3,9 @@ let param = if stdenv.lib.versionAtLeast ocaml.version "4.03" then { - version = "0.6"; - url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6/rope-0.6.tbz"; - sha256 = "06pkbnkad2ck50jn59ggwv154yd9vb01abblihvam6p27m4za1pc"; + version = "0.6.1"; + url = " https://github.com/Chris00/ocaml-rope/releases/download/0.6.1/rope-0.6.1.tbz"; + sha256 = "1zqh28jz1zjb0l354wi1046qpkwmk582ssz0gsqh6d44wpspdxk2"; buildInputs = [ dune ]; extra = { buildPhase = "dune build -p rope"; diff --git a/pkgs/development/ocaml-modules/zarith/default.nix b/pkgs/development/ocaml-modules/zarith/default.nix index e5d9549705892..d91f6e1c8a31e 100644 --- a/pkgs/development/ocaml-modules/zarith/default.nix +++ b/pkgs/development/ocaml-modules/zarith/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gmp, perl }: +{ stdenv, buildOcaml, fetchurl +, ocaml, findlib, pkgconfig, perl +, gmp +}: -assert stdenv.lib.versionAtLeast ocaml.version "3.12.1"; - -let param = +let source = if stdenv.lib.versionAtLeast ocaml.version "4.02" then { version = "1.7"; @@ -15,18 +16,20 @@ let param = }; in -stdenv.mkDerivation rec { - name = "zarith-${version}"; - inherit (param) version; +buildOcaml rec { + name = "zarith"; + inherit (source) version; + src = fetchurl { inherit (source) url sha256; }; - src = fetchurl { - inherit (param) url sha256; - }; + minimumSupportedOcamlVersion = "3.12.1"; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ocaml findlib perl ]; propagatedBuildInputs = [ gmp ]; + # needed so setup-hook.sh sets CAML_LD_LIBRARY_PATH for dllzarith.so + hasSharedObjects = true; + patchPhase = "patchShebangs ./z_pp.pl"; configurePhase = '' ./configure -installdir $out/lib/ocaml/${ocaml.version}/site-lib |