2023-08-22 20:05:09 +00:00
|
|
|
{ fetchFromGitea
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, scdoc
|
2022-08-12 12:06:08 +00:00
|
|
|
, gobject-introspection
|
|
|
|
, lib
|
2023-08-22 20:05:09 +00:00
|
|
|
, libayatana-appindicator
|
2022-08-12 12:06:08 +00:00
|
|
|
, libnotify
|
2023-08-22 20:05:09 +00:00
|
|
|
, python3Packages
|
2022-08-12 12:06:08 +00:00
|
|
|
, procps
|
|
|
|
, xset
|
|
|
|
, xautolock
|
|
|
|
, xscreensaver
|
|
|
|
, xfce
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "caffeine-ng";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "4.2.0";
|
|
|
|
format = "other";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "WhyNotHugo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-uYzLRZ+6ZgIwhSuJWRBpLYHgonX7sFXgUZid0V26V0Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ gobject-introspection meson ninja pkg-config wrapGAppsHook3 ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
buildInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
libayatana-appindicator
|
2022-08-12 12:06:08 +00:00
|
|
|
libnotify
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
pythonPath = with python3Packages; [
|
|
|
|
click
|
2022-08-12 12:06:08 +00:00
|
|
|
dbus-python
|
|
|
|
ewmh
|
|
|
|
pulsectl
|
|
|
|
pygobject3
|
2023-08-22 20:05:09 +00:00
|
|
|
scdoc
|
2022-08-12 12:06:08 +00:00
|
|
|
setproctitle
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
dontWrapGApps = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
patches = [
|
|
|
|
./fix-build.patch
|
|
|
|
];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postPatch = ''
|
|
|
|
echo "${version}" > version
|
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
postInstall = ''
|
|
|
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
2022-08-21 13:32:41 +00:00
|
|
|
'';
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
preFixup = ''
|
2022-08-12 12:06:08 +00:00
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ procps xautolock xscreensaver xfce.xfconf xset ]}
|
|
|
|
)
|
2022-08-21 13:32:41 +00:00
|
|
|
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-05-28 09:39:13 +00:00
|
|
|
mainProgram = "caffeine";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ marzipankaiser ];
|
|
|
|
description = "Status bar application to temporarily inhibit screensaver and sleep mode";
|
2022-08-12 12:06:08 +00:00
|
|
|
homepage = "https://codeberg.org/WhyNotHugo/caffeine-ng";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://codeberg.org/WhyNotHugo/caffeine-ng/src/tag/v${version}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|