diff --git a/pkgs/development/compilers/heptagon/default.nix b/pkgs/by-name/he/heptagon/package.nix similarity index 83% rename from pkgs/development/compilers/heptagon/default.nix rename to pkgs/by-name/he/heptagon/package.nix index 0bfdb702aaaf..be1b69a3a263 100644 --- a/pkgs/development/compilers/heptagon/default.nix +++ b/pkgs/by-name/he/heptagon/package.nix @@ -4,6 +4,7 @@ fetchFromGitLab, makeWrapper, ocamlPackages, + fetchpatch, }: stdenv.mkDerivation (finalAttrs: { @@ -18,6 +19,13 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-b4O48MQT3Neh8a1Z5wRgS701w6XrwpsbSMprlqTT+CE="; }; + patches = [ + (fetchpatch { + url = "https://gitlab.inria.fr/synchrone/heptagon/-/commit/f10405e385ca25dc737727e0c210a44986929bf0.patch"; + hash = "sha256-Sn55jEoRDYnEUg4SjuBDCNN4TNl2Dwn1fTjb9O8O1bo="; + }) + ]; + strictDeps = true; nativeBuildInputs = with ocamlPackages; [ diff --git a/pkgs/development/ocaml-modules/config-file/default.nix b/pkgs/development/ocaml-modules/config-file/default.nix index f20a7d9b113f..4bb913d544bf 100644 --- a/pkgs/development/ocaml-modules/config-file/default.nix +++ b/pkgs/development/ocaml-modules/config-file/default.nix @@ -7,30 +7,34 @@ camlp4, }: -stdenv.mkDerivation rec { - pname = "ocaml-config-file"; - version = "1.2"; +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "config-file is not available for OCaml ${ocaml.version}" - src = fetchurl { - url = "https://forge.ocamlcore.org/frs/download.php/1387/config-file-${version}.tar.gz"; - sha256 = "1b02yxcnsjhr05ssh2br2ka4hxsjpdw34ldl3nk33wfnkwk7g67q"; - }; + stdenv.mkDerivation + rec { + pname = "ocaml-config-file"; + version = "1.2"; - nativeBuildInputs = [ - ocaml - findlib - camlp4 - ]; + src = fetchurl { + url = "https://forge.ocamlcore.org/frs/download.php/1387/config-file-${version}.tar.gz"; + sha256 = "1b02yxcnsjhr05ssh2br2ka4hxsjpdw34ldl3nk33wfnkwk7g67q"; + }; - strictDeps = true; + nativeBuildInputs = [ + ocaml + findlib + camlp4 + ]; - createFindlibDestdir = true; + strictDeps = true; - meta = { - homepage = "http://config-file.forge.ocamlcore.org/"; - platforms = ocaml.meta.platforms or [ ]; - description = "OCaml library used to manage the configuration file(s) of an application"; - license = lib.licenses.lgpl2Plus; - maintainers = with lib.maintainers; [ vbgl ]; - }; -} + createFindlibDestdir = true; + + meta = { + homepage = "http://config-file.forge.ocamlcore.org/"; + platforms = ocaml.meta.platforms or [ ]; + description = "OCaml library used to manage the configuration file(s) of an application"; + license = lib.licenses.lgpl2Plus; + maintainers = with lib.maintainers; [ vbgl ]; + }; + } diff --git a/pkgs/development/ocaml-modules/ulex/default.nix b/pkgs/development/ocaml-modules/ulex/default.nix index bbc26d8650f8..ac98285c101f 100644 --- a/pkgs/development/ocaml-modules/ulex/default.nix +++ b/pkgs/development/ocaml-modules/ulex/default.nix @@ -23,39 +23,43 @@ let }; in -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-${pname}-${version}"; - inherit (param) version; +lib.throwIf (lib.versionAtLeast ocaml.version "5.0") + "ulex is not available for OCaml ${ocaml.version}" - src = fetchFromGitHub { - owner = "whitequark"; - repo = pname; - rev = "v${version}"; - inherit (param) sha256; - }; + stdenv.mkDerivation + rec { + name = "ocaml${ocaml.version}-${pname}-${version}"; + inherit (param) version; - createFindlibDestdir = true; + src = fetchFromGitHub { + owner = "whitequark"; + repo = pname; + rev = "v${version}"; + inherit (param) sha256; + }; - nativeBuildInputs = [ - ocaml - findlib - ocamlbuild - camlp4 - ]; - propagatedBuildInputs = [ camlp4 ]; + createFindlibDestdir = true; - strictDeps = true; + nativeBuildInputs = [ + ocaml + findlib + ocamlbuild + camlp4 + ]; + propagatedBuildInputs = [ camlp4 ]; - buildFlags = [ - "all" - "all.opt" - ]; + strictDeps = true; - meta = { - inherit (src.meta) homepage; - description = "Lexer generator for Unicode and OCaml"; - license = lib.licenses.mit; - inherit (ocaml.meta) platforms; - maintainers = [ lib.maintainers.roconnor ]; - }; -} + buildFlags = [ + "all" + "all.opt" + ]; + + meta = { + inherit (src.meta) homepage; + description = "Lexer generator for Unicode and OCaml"; + license = lib.licenses.mit; + inherit (ocaml.meta) platforms; + maintainers = [ lib.maintainers.roconnor ]; + }; + } diff --git a/pkgs/development/tools/ocaml/camlp4/default.nix b/pkgs/development/tools/ocaml/camlp4/default.nix index ac76bfba3f32..89cdc1eb6ec3 100644 --- a/pkgs/development/tools/ocaml/camlp4/default.nix +++ b/pkgs/development/tools/ocaml/camlp4/default.nix @@ -4,10 +4,12 @@ fetchzip, which, ocaml, + camlp-streams, ocamlbuild, + findlib, }: -if lib.versionAtLeast ocaml.version "4.15" then +if lib.versionAtLeast ocaml.version "5.4" then throw "camlp4 is not available for OCaml ${ocaml.version}" else @@ -66,6 +68,22 @@ else version = "4.14+1"; sha256 = "sha256-cPN3GioZT/Zt6uzbjGUPEGVJcPQdsAnCkU/AQoPfvuo="; }; + "5.0" = { + version = "5.0"; + sha256 = "sha256-oZptFNPUEAq5YlcqAoDWfLghGMF9AN7E7hUN55SAX+4="; + }; + "5.1" = { + version = "5.1"; + sha256 = "sha256-Ubedjg3BeHA0bJbEalQN9eEk5+LRAI/er+8mWfVYchg="; + }; + "5.2" = { + version = "5.2"; + sha256 = "sha256-lzbc9xsgeYlbVf71O+PWYS14QivAH1aPdnvWhe0HHME="; + }; + "5.3" = { + version = "5.3"; + sha256 = "sha256-V/kKhTP9U4jWDFuQKuB7BS3XICg1lq/2Avj7UJR55+k="; + }; } .${ocaml.meta.branch}; in @@ -81,9 +99,18 @@ else strictDeps = true; - nativeBuildInputs = [ - which - ocaml + nativeBuildInputs = + [ + which + ocaml + ocamlbuild + ] + ++ lib.optionals (lib.versionAtLeast ocaml.version "5.0") [ + findlib + ]; + + buildInputs = lib.optionals (lib.versionAtLeast ocaml.version "5.0") [ + camlp-streams ocamlbuild ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c86ab73d455d..770d6c409fab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6331,10 +6331,6 @@ with pkgs; inherit (emacs.pkgs.melpaStablePackages) irony; }; - heptagon = callPackage ../development/compilers/heptagon { - ocamlPackages = ocaml-ng.ocamlPackages_4_14; - }; - openjfx17 = openjfx; openjfx21 = callPackage ../by-name/op/openjfx/package.nix { featureVersion = "21"; }; openjfx23 = callPackage ../by-name/op/openjfx/package.nix { featureVersion = "23"; };