haskellPackages.mkDerivation: no rebuild w/o disallowedRequisites

This change ensures that packages won't be rebuild compared to before
the introduction of disallowedRequisites/disallowGhcReference unless
they use one of those arguments.

It may be nice to revert this in the future (via staging) for greater
simplicity, but will help with initial regression testing.

(cherry picked from commit 0454f7b8ee)
This commit is contained in:
sternenseemann 2024-05-27 16:21:16 +02:00
parent d2bd9e54e0
commit 19983e10e0

View File

@ -667,14 +667,6 @@ stdenv.mkDerivation ({
runHook postInstallIntermediates
'';
disallowedRequisites =
disallowedRequisites
++ (
if disallowGhcReference
then [ghc]
else []
);
passthru = passthru // rec {
inherit pname version disallowGhcReference;
@ -838,10 +830,19 @@ stdenv.mkDerivation ({
// optionalAttrs (args ? dontStrip) { inherit dontStrip; }
// optionalAttrs (postPhases != []) { inherit postPhases; }
// optionalAttrs (stdenv.buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; }
// optionalAttrs (disallowedRequisites != [] || disallowGhcReference) {
disallowedRequisites =
disallowedRequisites
++ (
if disallowGhcReference
then [ghc]
else []
);
}
# Implicit pointer to integer conversions are errors by default since clang 15.
# Works around https://gitlab.haskell.org/ghc/ghc/-/issues/23456.
// lib.optionalAttrs (stdenv.hasCC && stdenv.cc.isClang) {
// optionalAttrs (stdenv.hasCC && stdenv.cc.isClang) {
NIX_CFLAGS_COMPILE = "-Wno-error=int-conversion";
}
)