diff options
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules')
16 files changed, 73 insertions, 104 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix b/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix index 0d08cc48cb7b..b1d3d51c8666 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/camlimages/default.nix @@ -6,8 +6,6 @@ buildDunePackage rec { pname = "camlimages"; version = "5.0.4"; - duneVersion = "3"; - minimalOCamlVersion = "4.07"; src = fetchFromGitLab { @@ -17,6 +15,10 @@ buildDunePackage rec { sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4"; }; + postPatch = '' + substituteInPlace core/{images,units}.ml --replace String.lowercase String.lowercase_ascii + ''; + nativeBuildInputs = [ cppo ]; buildInputs = [ dune-configurator findlib graphics lablgtk stdio ]; diff --git a/nixpkgs/pkgs/development/ocaml-modules/cry/default.nix b/nixpkgs/pkgs/development/ocaml-modules/cry/default.nix index bf294b76db96..60ecb885d806 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/cry/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/cry/default.nix @@ -11,6 +11,10 @@ buildDunePackage rec { sha256 = "sha256-1Omp3LBKGTPVwEBd530H0Djn3xiEjOHLqso6S8yIJSQ="; }; + postPatch = '' + substituteInPlace src/dune --replace bytes "" + ''; + meta = with lib; { homepage = "https://github.com/savonet/ocaml-cry"; description = "OCaml client for the various icecast & shoutcast source protocols"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix b/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix index 3faef36e8ec4..43584461af18 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/dum/default.nix @@ -13,6 +13,12 @@ stdenv.mkDerivation rec { sha256 = "0yrxl97szjc0s2ghngs346x3y0xszx2chidgzxk93frjjpsr1mlr"; }; + postPatch = '' + substituteInPlace "dum.ml" \ + --replace "Lazy.lazy_is_val" "Lazy.is_val" \ + --replace "Obj.final_tag" "Obj.custom_tag" + ''; + nativeBuildInputs = [ ocaml findlib ]; propagatedBuildInputs = [ easy-format ]; diff --git a/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix index d1f93f572645..082f47313bd4 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/erm_xml/default.nix @@ -1,6 +1,7 @@ { stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild }: if lib.versionOlder ocaml.version "4.02" +|| lib.versionAtLeast ocaml.version "5.0" then throw "erm_xml is not available for OCaml ${ocaml.version}" else diff --git a/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix b/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix index 2eca9a4644b5..5d7e5f59b8bd 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/fontconfig/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchFromGitHub, pkg-config, fontconfig, ocaml }: stdenv.mkDerivation { - pname = "ocaml-fontconfig"; + pname = "ocaml${ocaml.version}-fontconfig"; version = "unstable-2013-11-03"; src = fetchFromGitHub { @@ -11,6 +11,12 @@ stdenv.mkDerivation { sha256 = "1fw6bzydmnyh2g4x35mcbg0hypnxqhynivk4nakcsx7prr8zr3yh"; }; + postPatch = lib.optionalString (lib.versionAtLeast ocaml.version "4.03") '' + substituteInPlace extract_consts.ml \ + --replace String.lowercase String.lowercase_ascii \ + --replace String.capitalize String.capitalize_ascii + ''; + nativeBuildInputs = [ pkg-config ocaml ]; buildInputs = [ fontconfig ]; @@ -24,7 +30,7 @@ stdenv.mkDerivation { meta = { description = "Fontconfig bindings for OCaml"; license = lib.licenses.gpl2Plus; - platforms = ocaml.meta.platforms or [ ]; + platforms = ocaml.meta.platforms; maintainers = with lib.maintainers; [ vbgl ]; }; } diff --git a/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix b/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix index 3c56aaf0a0ad..8a960dedcb5c 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/functory/default.nix @@ -1,7 +1,5 @@ { lib, stdenv, fetchurl, ocaml, findlib }: -assert lib.versionAtLeast (lib.getVersion ocaml) "3.11"; - let param = if lib.versionAtLeast ocaml.version "4.02" then { version = "0.6"; @@ -12,6 +10,9 @@ let param = }; in +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "functory is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation { pname = "ocaml${ocaml.version}-functory"; inherit (param) version; diff --git a/nixpkgs/pkgs/development/ocaml-modules/gd4o/default.nix b/nixpkgs/pkgs/development/ocaml-modules/gd4o/default.nix index cd2069648566..f3206c2385a3 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/gd4o/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/gd4o/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchurl, ocaml, gd, freetype, findlib, zlib, libpng, libjpeg }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "gd4o is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-gd4o"; version = "1.0a5"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/getopt/default.nix b/nixpkgs/pkgs/development/ocaml-modules/getopt/default.nix index e3bf2fb5d641..db03f7b07939 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/getopt/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/getopt/default.nix @@ -1,28 +1,22 @@ -{ lib, fetchzip, stdenv, ocaml, findlib, ocamlbuild }: +{ lib, fetchFromGitHub, buildDunePackage }: -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-getopt"; - version = "20120615"; +buildDunePackage rec { + pname = "getopt"; + version = "20230213"; - src = fetchzip { - url = "https://download.ocamlcore.org/ocaml-getopt/ocaml-getopt/${version}/ocaml-getopt-${version}.tar.gz"; - sha256 = "0bng2mmdixpmj23xn8krlnaq66k22iclwz46r8zjrsrq3wcn1xgn"; - }; - - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; + minimalOCamlVersion = "4.07"; - strictDeps = true; + src = fetchFromGitHub { + owner = "scemama"; + repo = "ocaml-getopt"; + rev = version; + hash = "sha256-oYDm945LgjIW+8x7UrO4FlbHywnu8480aiEVvnjBxc8="; + }; doCheck = true; - createFindlibDestdir = true; meta = { - inherit (ocaml.meta) platforms; - homepage = "https://github.com/gildor478/ocaml-getopt"; + homepage = "https://github.com/scemama/ocaml-getopt"; description = "Parsing of command line arguments (similar to GNU GetOpt) for OCaml"; license = lib.licenses.mit; maintainers = [ lib.maintainers.ulrikstrid ]; diff --git a/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix b/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix index cb885b7b069c..abe1649e0094 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/lablgl/default.nix @@ -1,24 +1,24 @@ -{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut, darwin } : +{ lib, stdenv, fetchFromGitHub, ocaml, findlib, libGLU, libGL, freeglut, camlp-streams, darwin } : -if lib.versionOlder ocaml.version "4.03" +if lib.versionOlder ocaml.version "4.06" then throw "lablgl is not available for OCaml ${ocaml.version}" else stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-lablgl"; - version = "1.06"; + version = "1.07"; src = fetchFromGitHub { owner = "garrigue"; repo = "lablgl"; rev = "v${version}"; - sha256 = "sha256:141kc816iv59z96738i3vn9m9iw9g2zhi45hk4cchpwd99ar5l6k"; + hash = "sha256-GiQKHMn5zHyvDrA2ve12X5YTm3/RZp8tukIqifgVaW4="; }; strictDeps = true; nativeBuildInputs = [ ocaml findlib ]; - buildInputs = [ freeglut ]; + buildInputs = [ freeglut camlp-streams ]; propagatedBuildInputs = [ libGLU libGL diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix b/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix index 43bd194b655b..7c197f9e87b0 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/ocaml-gettext/stub.nix @@ -1,6 +1,9 @@ { lib, buildDunePackage, ocaml, ocaml_gettext, dune-configurator, ounit }: -buildDunePackage rec { +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "gettext-stub is not available for OCaml ${ocaml.version}" + +buildDunePackage { pname = "gettext-stub"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix b/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix deleted file mode 100644 index 2a33d8b17ccc..000000000000 --- a/nixpkgs/pkgs/development/ocaml-modules/ocamlsdl/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{stdenv, lib, fetchurl, ocaml, pkg-config, findlib, SDL, SDL_image, SDL_mixer, SDL_ttf, SDL_gfx, lablgl }: - -let - pname = "ocamlsdl"; -in - -if lib.versionAtLeast ocaml.version "4.06" -then throw "${pname} is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { - name = "${pname}-${version}"; - version = "0.9.1"; - - src = fetchurl { - url = "mirror://sourceforge/project/ocamlsdl/OCamlSDL/ocamlsdl-0.9.1/ocamlsdl-0.9.1.tar.gz"; - sha256 = "abfb295b263dc11e97fffdd88ea1a28b46df8cc2b196777093e4fe7f509e4f8f"; - }; - - strictDeps = true; - - nativeBuildInputs = [ pkg-config ocaml findlib ]; - buildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx lablgl ]; - - propagatedBuildInputs = [ SDL SDL_image SDL_mixer SDL_ttf SDL_gfx pkg-config ]; - createFindlibDestdir = true; - - meta = { - homepage = "http://ocamlsdl.sourceforge.net/"; - description = "OCaml bindings for SDL 1.2"; - license = lib.licenses.lgpl21; - }; -} diff --git a/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix b/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix index b52c73d0534e..fb5f0192c459 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/piqi/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchFromGitHub, ocaml, findlib, which, sedlex, easy-format, xmlm, base64 }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "piqi is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { version = "0.6.16"; pname = "piqi"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/pyml/default.nix b/nixpkgs/pkgs/development/ocaml-modules/pyml/default.nix index 8358be50032a..ed7f2ef559ed 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/pyml/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/pyml/default.nix @@ -9,31 +9,15 @@ buildDunePackage rec { pname = "pyml"; - version = "20220905"; + version = "20231101"; src = fetchFromGitHub { owner = "thierry-martinez"; repo = "pyml"; rev = version; - sha256 = "PL4tFIKQLRutSn9Sf84/ImJv0DqkstNnJaNBqWDTKDQ="; + sha256 = "sha256-0Yy5T/S3Npwt0XJmEsdXGg5AXYi9vV9UG9nMSzz/CEc="; }; - patches = [ - # Fixes test crash. - # https://github.com/thierry-martinez/pyml/issues/85 - (fetchpatch { - url = "https://github.com/thierry-martinez/pyml/commit/a0bc5aca8632bea273f869d622cad2f55e754a7c.patch"; - sha256 = "bOqAokm5DE5rlvkBMQZtwMppRmoK9cvjJeGeP6BusnE="; - excludes = [ - "CHANGES.md" - ]; - }) - (fetchpatch { - url = "https://github.com/thierry-martinez/pyml/commit/97407473800b3f6215190643c1e6b9bd25d5caeb.patch"; - hash = "sha256-7CrVuV4JT7fyi/ktWz4nNOG/BbqsQVCoJwCAhE2y4YU="; - }) - ]; - buildInputs = [ utop ]; @@ -44,7 +28,8 @@ buildDunePackage rec { ]; nativeCheckInputs = [ - python3.pkgs.numpy python3.pkgs.ipython + python3.pkgs.numpy + python3.pkgs.ipython ]; strictDeps = true; diff --git a/nixpkgs/pkgs/development/ocaml-modules/semver/default.nix b/nixpkgs/pkgs/development/ocaml-modules/semver/default.nix index 15bd02f18687..5f4880c0cf2e 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/semver/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/semver/default.nix @@ -1,29 +1,19 @@ -{ stdenv, lib, fetchzip, ocaml, findlib, ocamlbuild }: +{ lib, fetchurl, buildDunePackage, ocaml, alcotest }: -lib.throwIfNot (lib.versionAtLeast ocaml.version "4.02") - "semver is not available on OCaml older than 4.02" - -stdenv.mkDerivation rec { - pname = "ocaml${ocaml.version}-semver"; - version = "0.1.0"; - src = fetchzip { - url = "https://github.com/rgrinberg/ocaml-semver/archive/v${version}.tar.gz"; - sha256 = "sha256-0BzeuVTpuRIQjadGg08hTvMzZtKCl2utW2YK269oETk="; +buildDunePackage rec { + pname = "semver"; + version = "0.2.1"; + src = fetchurl { + url = "https://github.com/rgrinberg/ocaml-semver/releases/download/${version}/semver-${version}.tbz"; + hash = "sha256-CjzDUtoe5Hvt6zImb+EqVIulRUUUQd9MmuJ4BH/2mLg="; }; - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - ]; - - strictDeps = true; - createFindlibDestdir = true; + doCheck = lib.versionAtLeast ocaml.version "4.08"; + checkInputs = [ alcotest ]; meta = { homepage = "https://github.com/rgrinberg/ocaml-semver"; description = "Semantic versioning module"; - platforms = ocaml.meta.platforms; license = lib.licenses.bsd3; maintainers = [ lib.maintainers.ulrikstrid ]; }; diff --git a/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix b/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix index 74983fef3e77..87fb82adcbeb 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/sodium/default.nix @@ -1,5 +1,8 @@ { lib, stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, ctypes, libsodium }: +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "sodium is not available for OCaml ${ocaml.version}" + stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-sodium"; version = "0.6.0"; diff --git a/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix b/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix index 70f0be8c7af8..b260d946ce1e 100644 --- a/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix +++ b/nixpkgs/pkgs/development/ocaml-modules/zarith/default.nix @@ -9,12 +9,12 @@ else stdenv.mkDerivation rec { pname = "ocaml${ocaml.version}-zarith"; - version = "1.12"; + version = "1.13"; src = fetchFromGitHub { owner = "ocaml"; repo = "Zarith"; rev = "release-${version}"; - sha256 = "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"; + sha256 = "sha256-CNVKoJeO3fsmWaV/dwnUA8lgI4ZlxR/LKCXpCXUrpSg="; }; nativeBuildInputs = [ pkg-config ocaml findlib ]; @@ -30,7 +30,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Fast, arbitrary precision OCaml integers"; - homepage = "http://forge.ocamlcore.org/projects/zarith"; + homepage = "https://github.com/ocaml/Zarith"; + changelog = "https://github.com/ocaml/Zarith/raw/${src.rev}/Changes"; license = licenses.lgpl2; inherit (ocaml.meta) platforms; maintainers = with maintainers; [ thoughtpolice vbgl ]; |