From 9ee9dfac229a2930f13c393c83a67cba5bb19808 Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 4 Sep 2023 20:20:15 +0200 Subject: [PATCH 1/2] jack-example-tools: init at 4 --- pkgs/misc/jackaudio/tools.nix | 58 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++ 2 files changed, 63 insertions(+) create mode 100644 pkgs/misc/jackaudio/tools.nix diff --git a/pkgs/misc/jackaudio/tools.nix b/pkgs/misc/jackaudio/tools.nix new file mode 100644 index 000000000000..1e3a74e6f6ee --- /dev/null +++ b/pkgs/misc/jackaudio/tools.nix @@ -0,0 +1,58 @@ +{ stdenv +, lib + +, fetchFromGitHub + +, pkg-config +, meson +, ninja + +, jack +, alsa-lib +, libopus +, libsamplerate +, libsndfile +, readline +, zita-alsa-pcmi +, zita-resampler +}: + +stdenv.mkDerivation (final: { + pname = "jack-example-tools"; + version = "4"; + + src = fetchFromGitHub { + owner = "jackaudio"; + repo = "jack-example-tools"; + rev = "tags/${final.version}"; + hash = "sha256-5jmynNxwNVLxEZ1MaqQUG6kRwipDkjhrdDCbZHtmAHk="; + }; + + nativeBuildInputs = [ pkg-config meson ninja ]; + buildInputs = [ + jack + alsa-lib + libopus + libsamplerate + libsndfile + readline + zita-alsa-pcmi + zita-resampler + ]; + + postPatch = '' + patchShebangs scripts + ''; + + # no tests defined, but prepare for some in the future. + doCheck = true; + + meta = with lib; { + description = "Official examples and tools from the JACK project"; + homepage = "https://jackaudio.org"; + license = licenses.gpl2Plus; + platforms = platforms.unix; + broken = stdenv.isDarwin; + maintainers = with maintainers; [ pennae ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b10ea04b2b4..804658d92f20 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -40551,6 +40551,11 @@ with pkgs; libjack2 = jack2.override { prefix = "lib"; }; + jack-example-tools = callPackage ../misc/jackaudio/tools.nix { + libopus = libopus.override { withCustomModes = true; }; + jack = jack2; + }; + jack-autoconnect = libsForQt5.callPackage ../applications/audio/jack-autoconnect { }; jack_autoconnect = jack-autoconnect; From 6e56e31d38828196d67434e73338fa1c658d2ecb Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 4 Sep 2023 21:06:07 +0200 Subject: [PATCH 2/2] release-notes: add note about jack2 losing its tools let's spare anyone else using these the adventure of finding out why their scripts broke and where the tools went. --- nixos/doc/manual/release-notes/rl-2311.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md index aa6197039244..4ee8e1432a3e 100644 --- a/nixos/doc/manual/release-notes/rl-2311.section.md +++ b/nixos/doc/manual/release-notes/rl-2311.section.md @@ -85,6 +85,8 @@ - The `services.ananicy.extraRules` option now has the type of `listOf attrs` instead of `string`. +- JACK tools (`jack_*` except `jack_control`) have moved from the `jack2` package to `jack-example-tools` + - The `matrix-synapse` package & module have undergone some significant internal changes, for most setups no intervention is needed, though: - The option [`services.matrix-synapse.package`](#opt-services.matrix-synapse.package) is now read-only. For modifying the package, use an overlay which modifies `matrix-synapse-unwrapped` instead. More on that below. - The `enableSystemd` & `enableRedis` arguments have been removed and `matrix-synapse` has been renamed to `matrix-synapse-unwrapped`. Also, several optional dependencies (such as `psycopg2` or `authlib`) have been removed.