octavePackages.windows: Run autoreconf hook on compiled sources
These sources include leftover config.guess and config.sub scripts generated by upstream maintainer's bootstrap script. Their bootstrap script uses wget to grab config.guess and config.sub files, which we cannot do inside the Nix build environment. So we forcibly remove the config.* scripts and run autoreconf ourselves (through autoreconfHook).
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
autoreconfHook,
|
||||
}:
|
||||
|
||||
buildOctavePackage rec {
|
||||
@@ -16,6 +17,25 @@ buildOctavePackage rec {
|
||||
sha256 = "sha256-hr94VALlAEwpqNU7imEN63M0BdPFSu5IznhWOn/mNiQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
# autoreconfHook provides an autoreconfPhase that is run as a
|
||||
# preconfigurePhase, which means it runs AFTER the source is un-tarred, and
|
||||
# before buildOctavePackage's buildPhase re-tars it up into a format for later
|
||||
# consumption by Octave's "pkg build" command.
|
||||
preAutoreconf = ''
|
||||
pushd src
|
||||
# Upstream's bootstrap script uses wget to fetch config.guess & config.sub
|
||||
# and has them committed to the repository. We must remove them so autoreconf
|
||||
# actually fires for our environment.
|
||||
rm config.*
|
||||
'';
|
||||
postAutoreconf = ''
|
||||
popd
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { extraArgs = [ "--version-regex=release-(.*)" ]; };
|
||||
|
||||
meta = {
|
||||
|
||||
Reference in New Issue
Block a user