Skip to content

Commit

Permalink
haskellPackages.mkDerivation: no rebuild w/o disallowedRequisites
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sternenseemann committed May 27, 2024
1 parent d261882 commit 0454f7b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pkgs/development/haskell-modules/generic-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -702,14 +702,6 @@ stdenv.mkDerivation ({
runHook postInstallIntermediates
'';

disallowedRequisites =
disallowedRequisites
++ (
if disallowGhcReference
then [ghc]
else []
);

passthru = passthru // rec {

inherit pname version disallowGhcReference;
Expand Down Expand Up @@ -873,10 +865,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";
}
)
Expand Down

0 comments on commit 0454f7b

Please sign in to comment.