depot/pkgs/applications/audio/patchance/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

50 lines
1.3 KiB
Nix

{ lib, fetchurl, buildPythonApplication, libjack2, pyqt5, qt5, which, bash }:
buildPythonApplication rec {
pname = "patchance";
version = "1.1.0";
src = fetchurl {
url = "https://github.com/Houston4444/Patchance/releases/download/v${version}/Patchance-${version}-source.tar.gz";
sha256 = "sha256-wlkEKkPH2C/y7TQicIVycWbtLUdX2hICcUWi7nFN51w=";
};
format = "other";
nativeBuildInputs = [
pyqt5 # pyuic5 and pyrcc5 to build resources.
qt5.qttools # lrelease to build translations.
which # which to find lrelease.
qt5.wrapQtAppsHook
];
buildInputs = [ libjack2 bash ];
propagatedBuildInputs = [ pyqt5 ];
dontWrapQtApps = true; # The program is a python script.
installFlags = [ "PREFIX=$(out)" ];
makeWrapperArgs = [
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ libjack2 ])
];
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
postFixup = ''
wrapPythonProgramsIn "$out/share/patchance/src" "$out $pythonPath"
for file in $out/bin/*; do
wrapQtApp "$file"
done
'';
meta = with lib; {
homepage = "https://github.com/Houston4444/Patchance";
description = "JACK Patchbay GUI";
mainProgram = "patchance";
license = licenses.gpl2;
maintainers = with maintainers; [ orivej ];
platforms = platforms.linux;
};
}