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

Prior to this PR, gnu-config did its unpacking in the `buildPhase`,
which mean that `.overrideAttrs(_:{ patches = ... })` couldn't be used to
test out patches to `gnu-config`.

This PR fixes that.
This commit is contained in:
Adam Joseph 2023-08-14 02:48:55 -07:00
parent 0fc50aecd9
commit b563d910a0

View File

@ -23,9 +23,22 @@ 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
'';
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; {