From 4a6f9a7bd647d21ff2629cd94ae8e24a3743b8e2 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Wed, 29 Mar 2023 01:54:51 +0000 Subject: [PATCH] raysession: init at 0.13.1 (#222628) Fixes #194022 --- .../applications/audio/raysession/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 48 insertions(+) create mode 100644 pkgs/applications/audio/raysession/default.nix diff --git a/pkgs/applications/audio/raysession/default.nix b/pkgs/applications/audio/raysession/default.nix new file mode 100644 index 000000000000..bc1a85abafa2 --- /dev/null +++ b/pkgs/applications/audio/raysession/default.nix @@ -0,0 +1,44 @@ +{ lib, fetchurl, buildPythonApplication, pydbus, pyliblo, pyqt5, qttools, which }: + +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. + ]; + + propagatedBuildInputs = [ pydbus pyliblo pyqt5 ]; + + dontWrapQtApps = true; # The program is a python script. + + installFlags = [ "PREFIX=$(out)" ]; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7dc09423984a..91d3c4804374 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11372,6 +11372,10 @@ with pkgs; pystring = callPackage ../development/libraries/pystring { }; + raysession = python3Packages.callPackage ../applications/audio/raysession { + inherit (qt5) qttools; + }; + rbw = callPackage ../tools/security/rbw { inherit (darwin.apple_sdk.frameworks) Security; };