about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/doc/manual/release-notes/rl-2311.section.md2
-rw-r--r--pkgs/misc/jackaudio/tools.nix58
-rw-r--r--pkgs/top-level/all-packages.nix5
3 files changed, 65 insertions, 0 deletions
diff --git a/nixos/doc/manual/release-notes/rl-2311.section.md b/nixos/doc/manual/release-notes/rl-2311.section.md
index 05fcff30b07d..85c3ee7a1aa0 100644
--- a/nixos/doc/manual/release-notes/rl-2311.section.md
+++ b/nixos/doc/manual/release-notes/rl-2311.section.md
@@ -91,6 +91,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.
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 eb2c97d720fb..f0bb7d49bab8 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -40595,6 +40595,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;