python312Packages.powerfox: init at 1.1.0 (#371207)
[NixPkgs.git] / pkgs / applications / audio / patchance / default.nix
blobc527bc7037c2bac0e82149eb2debfd9aa8086092
2   lib,
3   fetchurl,
4   buildPythonApplication,
5   libjack2,
6   pyqt5,
7   qt5,
8   which,
9   bash,
12 buildPythonApplication rec {
13   pname = "patchance";
14   version = "1.1.0";
16   src = fetchurl {
17     url = "https://github.com/Houston4444/Patchance/releases/download/v${version}/Patchance-${version}-source.tar.gz";
18     sha256 = "sha256-wlkEKkPH2C/y7TQicIVycWbtLUdX2hICcUWi7nFN51w=";
19   };
21   format = "other";
23   nativeBuildInputs = [
24     pyqt5 # pyuic5 and pyrcc5 to build resources.
25     qt5.qttools # lrelease to build translations.
26     which # which to find lrelease.
27     qt5.wrapQtAppsHook
28   ];
29   buildInputs = [
30     libjack2
31     bash
32   ];
33   propagatedBuildInputs = [ pyqt5 ];
35   dontWrapQtApps = true; # The program is a python script.
37   installFlags = [ "PREFIX=$(out)" ];
39   makeWrapperArgs = [
40     "--suffix"
41     "LD_LIBRARY_PATH"
42     ":"
43     (lib.makeLibraryPath [ libjack2 ])
44   ];
46   preFixup = ''
47     makeWrapperArgs+=("''${qtWrapperArgs[@]}")
48   '';
50   postFixup = ''
51     wrapPythonProgramsIn "$out/share/patchance/src" "$out $pythonPath"
52     for file in $out/bin/*; do
53       wrapQtApp "$file"
54     done
55   '';
57   meta = with lib; {
58     homepage = "https://github.com/Houston4444/Patchance";
59     description = "JACK Patchbay GUI";
60     mainProgram = "patchance";
61     license = licenses.gpl2;
62     maintainers = with maintainers; [ orivej ];
63     platforms = platforms.linux;
64   };