From cadeeaa525cba69c99387779ed05cbd672a254c3 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Wed, 18 Sep 2024 14:13:53 +0200 Subject: [PATCH] buildDunePackage: allow overriding `stdenv` --- pkgs/build-support/ocaml/dune.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index e293605cb31d..fbf732958a45 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -4,14 +4,15 @@ let Dune = let dune-version = args.duneVersion or "3"; in - { "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}" -; in + { "1" = dune_1; "2" = dune_2; "3" = dune_3; }."${dune-version}"; + stdenv' = args.stdenv or stdenv; +in if args ? minimalOCamlVersion && lib.versionOlder ocaml.version args.minimalOCamlVersion then throw "${pname}-${version} is not available for OCaml ${ocaml.version}" else -stdenv.mkDerivation ({ +stdenv'.mkDerivation ({ inherit enableParallelBuilding; dontAddStaticConfigureFlags = true;