From 0ba507689d6d614ba79c2562dbaa21b19f4626b0 Mon Sep 17 00:00:00 2001 From: Kenji Maillard Date: Tue, 20 Sep 2022 14:41:04 +0200 Subject: [PATCH] fix dev metacoq builds for coq >= 8.16 --- pkgs/development/coq-modules/metacoq/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/coq-modules/metacoq/default.nix b/pkgs/development/coq-modules/metacoq/default.nix index 268ce247c7d3..9eca682b9f91 100644 --- a/pkgs/development/coq-modules/metacoq/default.nix +++ b/pkgs/development/coq-modules/metacoq/default.nix @@ -75,10 +75,13 @@ let }; } // optionalAttrs (package != "single") { passthru = genAttrs packages metacoq_; }) - ).overrideAttrs (o: { - propagatedBuildInputs = o.propagatedBuildInputs ++ - optional (versionAtLeast o.version "1.0-8.16") coq.ocamlPackages.stdlib-shims; - }); - in derivation; + ).overrideAttrs (o: + let requiresOcamlStdlibShims = versionAtLeast o.version "1.0-8.16" || + (o.version == "dev" && (versionAtLeast coq.coq-version "8.16" || coq.coq-version == "dev")) ; + in + { + propagatedBuildInputs = o.propagatedBuildInputs ++ optional requiresOcamlStdlibShims coq.ocamlPackages.stdlib-shims; + }); + in derivation; in metacoq_ (if single then "single" else "all")