nixpkgs/pkgs/by-name/pa/patray/package.nix
Robert Schütz 368f285bdb patray: use python312
Shiboken2, and thus pyside2, is broken on Python 3.13.
2025-06-16 13:16:55 -07:00

45 lines
998 B
Nix

{
lib,
python312,
fetchPypi,
qt5,
}:
python312.pkgs.buildPythonApplication rec {
pname = "patray";
version = "0.1.2";
src = fetchPypi {
inherit version pname;
hash = "sha256-O8CBUexL2V1qI7bB/Lns3yjUvFOpC6spd/6asXa5+pw=";
};
patchPhase = ''
sed -i '30i entry_points = { "console_scripts": [ "patray = patray.__main__:main" ] },' setup.py
sed -i 's/production.txt/production.in/' setup.py
sed -i '/pyside2/d' requirements/production.in
'';
dependencies = with python312.pkgs; [
pulsectl
loguru
cock
pyside2
];
doCheck = false;
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
postFixup = ''
wrapQtApp $out/bin/patray --prefix QT_PLUGIN_PATH : ${qt5.qtbase}/${qt5.qtbase.qtPluginPrefix}
'';
meta = with lib; {
description = "Yet another tray pulseaudio frontend";
homepage = "https://github.com/pohmelie/patray";
license = licenses.mit;
maintainers = with maintainers; [ ];
mainProgram = "patray";
};
}