depot/third_party/nixpkgs/pkgs/tools/audio/patray/default.nix
Default email 9c6ee729d6 Project import generated by Copybara.
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
2023-07-15 19:15:38 +02:00

42 lines
981 B
Nix

{ lib
, python3
, fetchPypi
, qt5
}:
python3.pkgs.buildPythonApplication rec {
pname = "patray";
version = "0.1.1";
src = fetchPypi {
inherit version pname;
sha256 = "0vaapn2p4257m1d5nbnwnh252b7lhl00560gr9pqh2b7xqm1bh6g";
};
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
'';
propagatedBuildInputs = with python3.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; [ domenkozar ];
};
}