From e5b296303cd5281646779f7239bc59aa80980378 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sun, 12 Jan 2025 16:03:21 +0100 Subject: [PATCH] ocamlPackages.config-file: mark as unavailable for ocaml 5.0+ --- .../ocaml-modules/config-file/default.nix | 48 ++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) 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 ]; + }; + }