From 8542ba3e4a31a6ae69be71a3c5707a7ffb634c24 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Wed, 4 Mar 2026 10:30:18 -0600 Subject: [PATCH 1/3] octavePackages.audio: Run autoreconf hook on compiled sources Nixpkgs commit a0b51629f9e6a43a0312299f11dd9597dd936484 switched where audio gets it sources, from a release tarball to the actual upstream 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). --- .../octave-modules/audio/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/development/octave-modules/audio/default.nix b/pkgs/development/octave-modules/audio/default.nix index 777cf5d40249..c4bbb27d037f 100644 --- a/pkgs/development/octave-modules/audio/default.nix +++ b/pkgs/development/octave-modules/audio/default.nix @@ -7,6 +7,7 @@ alsa-lib, rtmidi, pkg-config, + autoreconfHook, }: buildOctavePackage rec { @@ -22,6 +23,7 @@ buildOctavePackage rec { nativeBuildInputs = [ pkg-config + autoreconfHook ]; propagatedBuildInputs = [ @@ -30,6 +32,21 @@ buildOctavePackage rec { rtmidi ]; + # 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 = { @@ -38,6 +55,5 @@ buildOctavePackage rec { maintainers = with lib.maintainers; [ KarlJoad ]; description = "Audio and MIDI Toolbox for GNU Octave"; platforms = lib.platforms.linux; # Because of run-time dependency on jack2 and alsa-lib - broken = true; }; } From 9ba8a0fc43f4ae0f8cd4db5a7bd1784280fe980a Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Wed, 4 Mar 2026 10:49:49 -0600 Subject: [PATCH 2/3] 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). --- .../octave-modules/windows/default.nix | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pkgs/development/octave-modules/windows/default.nix b/pkgs/development/octave-modules/windows/default.nix index 8c25872f889a..19febc53dee6 100644 --- a/pkgs/development/octave-modules/windows/default.nix +++ b/pkgs/development/octave-modules/windows/default.nix @@ -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 = { From eaf48a1fdec606acb5d44bb084d09dce9ef90817 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Wed, 4 Mar 2026 10:52:24 -0600 Subject: [PATCH 3/3] octavePackages.windows: Remove broken, add meta.platforms The package is not broken on Linux/Darwin, those platforms don't have COM interfaces. During Octave's "pkg install", it checks for this fact and will error if they are not available, see below. ``` error: __COM__: Your system doesn't support the COM interface ``` --- pkgs/development/octave-modules/windows/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/octave-modules/windows/default.nix b/pkgs/development/octave-modules/windows/default.nix index 19febc53dee6..b28373831a63 100644 --- a/pkgs/development/octave-modules/windows/default.nix +++ b/pkgs/development/octave-modules/windows/default.nix @@ -43,6 +43,6 @@ buildOctavePackage rec { license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ KarlJoad ]; description = "Provides COM interface and additional functionality on Windows"; - broken = true; + platforms = lib.platforms.windows; }; }