From e80c50b44d362e7facce8fc93564c844d0b624cc Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Sat, 30 Oct 2021 12:58:33 -0500 Subject: [PATCH 1/7] octavePackages: buildOctavePackage respects user-provided hooks octavePackages: Allow user to provide extra steps and information --- .../octave/build-octave-package.nix | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/development/interpreters/octave/build-octave-package.nix b/pkgs/development/interpreters/octave/build-octave-package.nix index 73a67769d6a6..065992f91271 100644 --- a/pkgs/development/interpreters/octave/build-octave-package.nix +++ b/pkgs/development/interpreters/octave/build-octave-package.nix @@ -54,7 +54,23 @@ let requiredOctavePackages' = computeRequiredOctavePackages requiredOctavePackages; -in stdenv.mkDerivation { + # Must use attrs.nativeBuildInputs before they are removed by the removeAttrs + # below, or everything fails. + nativeBuildInputs' = [ + octave + writeRequiredOctavePackagesHook + ] + ++ nativeBuildInputs; + + # This step is required because when + # a = { test = [ "a" "b" ]; }; b = { test = [ "c" "d" ]; }; + # (a // b).test = [ "c" "d" ]; + # This used to mean that if a package defined extra nativeBuildInputs, it + # would override the ones for building an Octave package (the hook and Octave + # itself, causing everything to fail. + attrs' = builtins.removeAttrs attrs [ "nativeBuildInputs" ]; + +in stdenv.mkDerivation ({ packageName = "${fullLibName}"; # The name of the octave package ends up being # "octave-version-package-version" @@ -77,11 +93,7 @@ in stdenv.mkDerivation { requiredOctavePackages = requiredOctavePackages'; - nativeBuildInputs = [ - octave - writeRequiredOctavePackagesHook - ] - ++ nativeBuildInputs; + nativeBuildInputs = nativeBuildInputs'; buildInputs = buildInputs ++ requiredOctavePackages'; @@ -110,4 +122,4 @@ in stdenv.mkDerivation { dontInstall = true; inherit meta; -} +} // attrs') From 4a2a66bb6d0379a5dcc724dd1eb9d3cfb038e6a2 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:41:49 -0500 Subject: [PATCH 2/7] octavePackages.audio: 2.0.2 -> 2.0.3 --- pkgs/development/octave-modules/audio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/octave-modules/audio/default.nix b/pkgs/development/octave-modules/audio/default.nix index 0cb03746085a..c0b4551ceca7 100644 --- a/pkgs/development/octave-modules/audio/default.nix +++ b/pkgs/development/octave-modules/audio/default.nix @@ -9,11 +9,11 @@ buildOctavePackage rec { pname = "audio"; - version = "2.0.2"; + version = "2.0.3"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "18lyvwmdy4b9pcv5sm7g17n3is32q23daw8fcsalkf4rj6cc6qdk"; + sha256 = "1431pf7mhxsrnzrx8r3hsy537kha7jhaligmp2rghwyxhq25hs0r"; }; nativeBuildInputs = [ From 098b0a2df383de31c6621a213a61887d64f90bc5 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:45:32 -0500 Subject: [PATCH 3/7] octavePackages.control: 3.3.0 -> 3.3.1 --- pkgs/development/octave-modules/control/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/octave-modules/control/default.nix b/pkgs/development/octave-modules/control/default.nix index b69343b1b4bb..79dbb99fadff 100644 --- a/pkgs/development/octave-modules/control/default.nix +++ b/pkgs/development/octave-modules/control/default.nix @@ -7,11 +7,11 @@ buildOctavePackage rec { pname = "control"; - version = "3.3.0"; + version = "3.3.1"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "1yksifligq2z3siqw701iq2ydgnj7pnkcw42bfmydcf6fc4drlvy"; + sha256 = "0vndbzix34vfzdlsz57bgkyg31as4kv6hfg9pwrcqn75bzzjsivw"; }; nativeBuildInputs = [ From 637ddb776c6bca487573bc6ea62d9edc66ba7f22 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:49:27 -0500 Subject: [PATCH 4/7] octavePackages.sparsersb: 1.0.8 -> 1.0.9 --- pkgs/development/octave-modules/sparsersb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/octave-modules/sparsersb/default.nix b/pkgs/development/octave-modules/sparsersb/default.nix index ecea6c0f62e4..507ed1100a42 100644 --- a/pkgs/development/octave-modules/sparsersb/default.nix +++ b/pkgs/development/octave-modules/sparsersb/default.nix @@ -6,11 +6,11 @@ buildOctavePackage rec { pname = "sparsersb"; - version = "1.0.8"; + version = "1.0.9"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "0nl7qppa1cm51188hqhbfswlih9hmy1yz7v0f5i07z0g0kbd62xw"; + sha256 = "0jyy2m7wylzyjqj9n6mjizhj0ccq8xnxm2g6pdlrmncxq1401khd"; }; propagatedBuildInputs = [ From 1203df184ac5e6f10410dbee9578a7938b50b400 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:50:55 -0500 Subject: [PATCH 5/7] octavePackages.zeromq: 1.5.2 -> 1.5.3 --- .../octave-modules/zeromq/default.nix | 19 +++++++++++++++++-- pkgs/top-level/octave-packages.nix | 2 +- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/development/octave-modules/zeromq/default.nix b/pkgs/development/octave-modules/zeromq/default.nix index 7a8f7f6d16a1..557a43a9820c 100644 --- a/pkgs/development/octave-modules/zeromq/default.nix +++ b/pkgs/development/octave-modules/zeromq/default.nix @@ -2,17 +2,32 @@ , lib , fetchurl , zeromq +, pkg-config +, autoreconfHook }: buildOctavePackage rec { pname = "zeromq"; - version = "1.5.2"; + version = "1.5.3"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "18h1039ri7dr37jv20cvj5vhw7b57frrda0hhbvlgixinbqmn9j7"; + sha256 = "1h0pb2pqbnyiavf7r05j8bqxqd8syz16ab48hc74nlnx727anfwl"; }; + preAutoreconf = '' + cd src + ''; + + postAutoreconf = '' + cd .. + ''; + + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; + propagatedBuildInputs = [ zeromq ]; diff --git a/pkgs/top-level/octave-packages.nix b/pkgs/top-level/octave-packages.nix index 115b38095ed1..b4aeb905280d 100644 --- a/pkgs/top-level/octave-packages.nix +++ b/pkgs/top-level/octave-packages.nix @@ -214,7 +214,7 @@ makeScope newScope (self: windows = callPackage ../development/octave-modules/windows { }; zeromq = callPackage ../development/octave-modules/zeromq { - inherit (pkgs) zeromq; + inherit (pkgs) zeromq autoreconfHook; }; }) From 7b8dd9515e3aed98b9ef8cf02df3179647f2ec54 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:52:01 -0500 Subject: [PATCH 6/7] octavePackages.nan: 3.5.3 -> 3.6.0 --- pkgs/development/octave-modules/nan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/octave-modules/nan/default.nix b/pkgs/development/octave-modules/nan/default.nix index f492d4440b19..3a972b76fdc6 100644 --- a/pkgs/development/octave-modules/nan/default.nix +++ b/pkgs/development/octave-modules/nan/default.nix @@ -6,11 +6,11 @@ buildOctavePackage rec { pname = "nan"; - version = "3.5.3"; + version = "3.6.0"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "1jailahbrh847875vszibn68lp4n5sdy68q51i7hd64qix8rmmpx"; + sha256 = "1zxdg0yg5jnwq6ppnikd13zprazia6w6zpgw99f62mc03iqk5c4q"; }; buildInputs = [ From 282f76086fc555a85c4583a5bea70585b7bb0863 Mon Sep 17 00:00:00 2001 From: Karl Hallsby Date: Fri, 29 Oct 2021 00:53:15 -0500 Subject: [PATCH 7/7] octavePackages.tsa: 4.6.2 -> 4.6.3 --- pkgs/development/octave-modules/tsa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/octave-modules/tsa/default.nix b/pkgs/development/octave-modules/tsa/default.nix index a6320f0fc01c..985612fa8c7a 100644 --- a/pkgs/development/octave-modules/tsa/default.nix +++ b/pkgs/development/octave-modules/tsa/default.nix @@ -6,11 +6,11 @@ buildOctavePackage rec { pname = "tsa"; - version = "4.6.2"; + version = "4.6.3"; src = fetchurl { url = "mirror://sourceforge/octave/${pname}-${version}.tar.gz"; - sha256 = "0p2cjszzjwhp4ih3q3r67qnikgxc0fwxc12p3727jbdvzq2h10mn"; + sha256 = "1pbxq77xc7pn0ki6rpijlq9v7inn0hn2adkx1skgwffl7pivrwsl"; }; requiredOctavePackages = [