From 60fef87420b75aa2aa74aa767bf2a2309b3139a8 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 24 Jul 2024 08:01:17 +0200 Subject: [PATCH] ocamlPackages.opam-repository: fix for opam 2.2 --- .../ocaml-modules/opam-repository/default.nix | 13 ++++--------- pkgs/top-level/ocaml-packages.nix | 4 +--- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pkgs/development/ocaml-modules/opam-repository/default.nix b/pkgs/development/ocaml-modules/opam-repository/default.nix index 008cc2812453..c23db8c79f0e 100644 --- a/pkgs/development/ocaml-modules/opam-repository/default.nix +++ b/pkgs/development/ocaml-modules/opam-repository/default.nix @@ -1,25 +1,20 @@ -{ lib, buildDunePackage, unzip, opam-format, curl }: +{ lib, buildDunePackage, opam-format, curl }: buildDunePackage rec { pname = "opam-repository"; - minimalOCamlVersion = "4.02"; - - useDune2 = true; - inherit (opam-format) src version; patches = [ ./download-tool.patch ]; postPatch = '' substituteInPlace src/repository/opamRepositoryConfig.ml \ - --replace "SUBSTITUTE_NIXOS_CURL_PATH" "\"${curl}/bin/curl\"" + --replace-fail "SUBSTITUTE_NIXOS_CURL_PATH" "\"${curl}/bin/curl\"" ''; - strictDeps = true; - - nativeBuildInputs = [ unzip curl ]; propagatedBuildInputs = [ opam-format ]; + configureFlags = [ "--disable-checks" ]; + meta = opam-format.meta // { description = "OPAM repository and remote sources handling, including curl/wget, rsync, git, mercurial, darcs backends"; maintainers = with lib.maintainers; [ sternenseemann ]; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b96f16057d81..35cf9eea6f30 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1388,9 +1388,7 @@ let inherit (pkgs) unzip; }; - opam-repository = callPackage ../development/ocaml-modules/opam-repository { - inherit (pkgs) unzip; - }; + opam-repository = callPackage ../development/ocaml-modules/opam-repository { }; opam-state = callPackage ../development/ocaml-modules/opam-state { inherit (pkgs) unzip;