Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gnu-config: use the unpackPhase, so .overrideAttrs(_:{patches=...}) works #249088

Merged
merged 2 commits into from Aug 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions pkgs/development/libraries/gnu-config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,29 @@ in stdenv.mkDerivation {
pname = "gnu-config";
version = "2023-07-31";

buildCommand = ''
install -Dm755 ${configGuess} $out/config.guess
install -Dm755 ${configSub} $out/config.sub
unpackPhase = ''
runHook preUnpack
cp ${configGuess} ./config.guess
cp ${configSub} ./config.sub
chmod +w ./config.sub ./config.guess
runHook postUnpack
'';

# If this isn't set, `pkgs.gnu-config.overrideAttrs( _: { patches
# = ...; })` will behave very counterintuitively: the (unpatched)
# gnu-config from the updateAutotoolsGnuConfigScriptsHook stdenv's
# defaultNativeBuildInputs will "update" the patched gnu-config by
# reverting the patch!
dontUpdateAutotoolsGnuConfigScripts = true;

dontConfigure = true;
dontBuild = true;

installPhase = ''
runHook preInstall
install -Dm755 ./config.guess $out/config.guess
install -Dm755 ./config.sub $out/config.sub
runHook postInstall
'';

meta = with lib; {
Expand Down