nixpkgs/pkgs/applications/audio/jamesdsp/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

98 lines
2.5 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2022-02-08 11:36:06 +00:00
, mkDerivation
, fetchFromGitHub
, pipewire
2022-04-19 16:21:27 +00:00
, pulseaudio
, gst_all_1
2022-02-08 11:36:06 +00:00
, glibmm
, qmake
2022-04-19 16:21:27 +00:00
, qtbase
, qtsvg
, wrapQtAppsHook
2022-02-08 11:36:06 +00:00
, makeDesktopItem
, pkg-config
, libarchive
, fetchpatch
2022-04-19 16:21:27 +00:00
, copyDesktopItems
, usePipewire ? true
, usePulseaudio ? false
2022-02-08 11:36:06 +00:00
}:
2022-04-19 16:21:27 +00:00
assert lib.asserts.assertMsg (usePipewire != usePulseaudio) "You need to enable one and only one of pulseaudio or pipewire support";
let
pluginPath = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with gst_all_1; [ gstreamer gst-plugins-base gst-plugins-good ]);
in
mkDerivation rec {
2022-02-08 11:36:06 +00:00
pname = "jamesdsp";
version = "2.3";
2022-04-19 16:21:27 +00:00
src = fetchFromGitHub rec {
2022-02-08 11:36:06 +00:00
owner = "Audio4Linux";
repo = "JDSP4Linux";
fetchSubmodules = true;
rev = version;
hash = "sha256-Hkzurr+s+vvSyOMCYH9kHI+nIm6mL9yORGNzY2FXslc=";
};
patches = [
# fixing /usr install assumption, remove on version bump
(fetchpatch {
url = "https://github.com/Audio4Linux/JDSP4Linux/commit/003c9e9fc426f83e269aed6e05be3ed55273931a.patch";
hash = "sha256-crll/a7C9pUq9eL5diq8/YgC5bNC6SrdijZEBxZpJ8E=";
})
# compatibility fix for PipeWire 0.3.44+, remove on version bump
(fetchpatch {
url = "https://github.com/Audio4Linux/JDSP4Linux/commit/e04c55735cc20fc3c3ce042c5681ec80f7df3c96.patch";
hash = "sha256-o6AUtQzugykALSdkM3i3lYqRmzJX3FzmALSi0TrWuRA=";
})
2022-02-08 11:36:06 +00:00
];
2022-04-19 16:21:27 +00:00
nativeBuildInputs = [
qmake
pkg-config
copyDesktopItems
wrapQtAppsHook
];
2022-02-08 11:36:06 +00:00
buildInputs = [
glibmm
libarchive
2022-04-19 16:21:27 +00:00
qtbase
qtsvg
] ++ lib.optional usePipewire pipewire
++ lib.optionals usePulseaudio [
pulseaudio
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gstreamer
2022-02-08 11:36:06 +00:00
];
2022-04-19 16:21:27 +00:00
qtWrapperArgs = lib.optionals usePulseaudio [ "--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : ${pluginPath}" ];
qmakeFlags = lib.optionals usePulseaudio [ "CONFIG+=USE_PULSEAUDIO" ];
2022-02-08 11:36:06 +00:00
desktopItems = [
(makeDesktopItem {
name = "jamesdsp";
2022-02-08 11:36:06 +00:00
desktopName = "JamesDSP";
genericName = "Audio effects processor";
exec = "jamesdsp";
icon = "jamesdsp";
comment = "JamesDSP for Linux";
categories = [ "AudioVideo" "Audio" ];
2022-02-08 11:36:06 +00:00
startupNotify = false;
keywords = [ "equalizer" "audio" "effect" ];
2022-02-08 11:36:06 +00:00
})
];
meta = with lib;{
broken = (stdenv.isLinux && stdenv.isAarch64);
2022-02-08 11:36:06 +00:00
description = "An audio effect processor for PipeWire clients";
homepage = "https://github.com/Audio4Linux/JDSP4Linux";
license = licenses.gpl3Only;
2022-04-19 16:21:27 +00:00
maintainers = with maintainers; [ pasqui23 rewine ];
2022-02-08 11:36:06 +00:00
platforms = platforms.linux;
};
}