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