2023-04-01 01:00:17 +00:00
|
|
|
{ lib, fetchurl, buildPythonApplication, libjack2, pydbus, pyliblo, pyqt5, qttools, which }:
|
2023-03-29 01:54:51 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "raysession";
|
|
|
|
version = "0.13.1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/Houston4444/RaySession/releases/download/v${version}/RaySession-${version}-source.tar.gz";
|
|
|
|
sha256 = "sha256-iiFRtX43u9BHe7a4ojza7kav+dMW9e05dPi7Gf9d1GM=";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix installation path of xdg schemas.
|
|
|
|
substituteInPlace Makefile --replace '$(DESTDIR)/' '$(DESTDIR)$(PREFIX)/'
|
|
|
|
# Do not wrap an importable module with a shell script.
|
|
|
|
chmod -x src/daemon/desktops_memory.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pyqt5 # pyuic5 and pyrcc5 to build resources.
|
|
|
|
qttools # lrelease to build translations.
|
|
|
|
which # which to find lrelease.
|
|
|
|
];
|
2023-04-01 01:00:17 +00:00
|
|
|
buildInputs = [ libjack2 ];
|
2023-03-29 01:54:51 +00:00
|
|
|
propagatedBuildInputs = [ pydbus pyliblo pyqt5 ];
|
|
|
|
|
|
|
|
dontWrapQtApps = true; # The program is a python script.
|
|
|
|
|
|
|
|
installFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
2023-04-01 01:00:17 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ libjack2 ])
|
|
|
|
];
|
|
|
|
|
2023-03-29 01:54:51 +00:00
|
|
|
postFixup = ''
|
|
|
|
wrapPythonProgramsIn "$out/share/raysession/src" "$out $pythonPath"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Houston4444/RaySession";
|
|
|
|
description = "Session manager for Linux musical programs";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|