2022-07-15 16:15:11 +00:00
|
|
|
{ buildPythonApplication
|
|
|
|
, fetchPypi
|
|
|
|
, gobject-introspection
|
|
|
|
, gtk3
|
|
|
|
, lib
|
|
|
|
, libappindicator-gtk3
|
|
|
|
, libnotify
|
|
|
|
, click
|
|
|
|
, dbus-python
|
|
|
|
, ewmh
|
|
|
|
, pulsectl
|
|
|
|
, pygobject3
|
|
|
|
, pyxdg
|
|
|
|
, setproctitle
|
|
|
|
, python3
|
|
|
|
, procps
|
|
|
|
, xset
|
|
|
|
, xautolock
|
|
|
|
, xscreensaver
|
|
|
|
, xfce
|
|
|
|
, glib
|
|
|
|
, setuptools-scm
|
|
|
|
, wrapGAppsHook
|
2019-05-08 19:31:56 +00:00
|
|
|
}:
|
|
|
|
|
2022-07-15 16:15:11 +00:00
|
|
|
let
|
|
|
|
click_7 = click.overridePythonAttrs (old: rec {
|
|
|
|
version = "7.1.2";
|
|
|
|
src = old.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
in buildPythonApplication rec {
|
2019-05-08 19:31:56 +00:00
|
|
|
pname = "caffeine-ng";
|
2022-07-15 16:15:11 +00:00
|
|
|
version = "4.0.2";
|
2019-05-08 19:31:56 +00:00
|
|
|
|
2022-07-15 16:15:11 +00:00
|
|
|
src = fetchPypi {
|
2019-05-08 19:31:56 +00:00
|
|
|
inherit pname version;
|
2022-07-15 16:15:11 +00:00
|
|
|
sha256 = "sha256-umIjXJ0et6Pi5Ejj96Q+ZhiKS+yj7bsgb4uQW6Ym6rU=";
|
2019-05-08 19:31:56 +00:00
|
|
|
};
|
|
|
|
|
2022-08-02 14:48:10 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook glib gobject-introspection setuptools-scm ];
|
2022-07-15 16:15:11 +00:00
|
|
|
|
2020-10-05 21:45:13 +00:00
|
|
|
buildInputs = [
|
2022-07-15 16:15:11 +00:00
|
|
|
libappindicator-gtk3
|
|
|
|
libnotify
|
|
|
|
gtk3
|
2019-09-05 15:44:55 +00:00
|
|
|
];
|
2022-07-15 16:15:11 +00:00
|
|
|
|
|
|
|
pythonPath = [
|
|
|
|
click_7
|
|
|
|
dbus-python
|
|
|
|
ewmh
|
|
|
|
pulsectl
|
|
|
|
pygobject3
|
|
|
|
pyxdg
|
|
|
|
setproctitle
|
2019-05-08 19:31:56 +00:00
|
|
|
];
|
|
|
|
|
2019-09-01 18:28:08 +00:00
|
|
|
doCheck = false; # There are no tests.
|
2022-08-08 16:35:28 +00:00
|
|
|
dontWrapGApps = true;
|
|
|
|
strictDeps = false;
|
2019-09-01 18:28:08 +00:00
|
|
|
|
2019-11-11 22:37:58 +00:00
|
|
|
postInstall = ''
|
2019-05-08 19:31:56 +00:00
|
|
|
cp -r share $out/
|
2022-07-15 16:15:11 +00:00
|
|
|
cp -r caffeine/assets/icons $out/share/
|
|
|
|
|
2019-11-11 22:37:58 +00:00
|
|
|
# autostart file
|
2022-07-15 16:15:11 +00:00
|
|
|
ln -s $out/${python3.sitePackages}/etc $out/etc
|
|
|
|
|
2019-05-08 19:31:56 +00:00
|
|
|
glib-compile-schemas --strict $out/share/glib-2.0/schemas
|
2022-08-08 16:35:28 +00:00
|
|
|
'';
|
2022-07-15 16:15:11 +00:00
|
|
|
|
2022-08-08 16:35:28 +00:00
|
|
|
preFixup = ''
|
2022-07-15 16:15:11 +00:00
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ procps xautolock xscreensaver xfce.xfconf xset ]}
|
|
|
|
)
|
2022-08-08 16:35:28 +00:00
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2019-05-08 19:31:56 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-05-22 17:13:04 +00:00
|
|
|
mainProgram = "caffeine";
|
2019-05-08 19:31:56 +00:00
|
|
|
maintainers = with maintainers; [ marzipankaiser ];
|
|
|
|
description = "Status bar application to temporarily inhibit screensaver and sleep mode";
|
2022-07-15 16:15:11 +00:00
|
|
|
homepage = "https://codeberg.org/WhyNotHugo/caffeine-ng";
|
2019-05-08 19:31:56 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|