mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
octavePackages.optim: Fix build
When fetching optim's release tarball, there are pre-generated configuration files in there. Previously, these would be used by our build system just fine. But, with Octave 11.1.0 and octavePackages.datatypes 1.5.0, there were compilation errors about incorrect names. To fix this, we discard the provided generated files and generate our own.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
fetchurl,
|
||||
struct,
|
||||
statistics,
|
||||
autoreconfHook,
|
||||
lapack,
|
||||
blas,
|
||||
}:
|
||||
@@ -17,6 +18,10 @@ buildOctavePackage rec {
|
||||
sha256 = "sha256-Wfs3caLSojE0R1MsWaLgAKanu3pnfz74GD+6qrVJOhQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
lapack
|
||||
blas
|
||||
@@ -27,6 +32,19 @@ buildOctavePackage rec {
|
||||
statistics
|
||||
];
|
||||
|
||||
# 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
|
||||
# Remove any files upstream generated for distribution.
|
||||
rm config.*
|
||||
'';
|
||||
postAutoreconf = ''
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://gnu-octave.github.io/packages/optim/";
|
||||
license = with lib.licenses; [
|
||||
|
||||
Reference in New Issue
Block a user