2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glib, gettext, bash }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-09 12:39:15 +00:00
|
|
|
pname = "gnome-shell-extension-caffeine";
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "38";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eonpatapon";
|
|
|
|
repo = "gnome-shell-extension-caffeine";
|
2020-12-09 12:39:15 +00:00
|
|
|
rev = "v${version}";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "0dyagnjmk91h96xr98mc177c473bqpxcv86qf6g3kyh3arwa9shs";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
passthru = {
|
|
|
|
extensionPortalSlug = "caffeine";
|
|
|
|
extensionUuid = "caffeine@patapon.info";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
glib gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook preBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
${bash}/bin/bash ./update-locale.sh
|
|
|
|
glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/share/gnome-shell/extensions
|
2021-07-14 22:03:04 +00:00
|
|
|
cp -r "caffeine@patapon.info" $out/share/gnome-shell/extensions
|
2020-07-18 16:06:22 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Fill the cup to inhibit auto suspend and screensaver";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ eperuffo ];
|
|
|
|
homepage = "https://github.com/eonpatapon/gnome-shell-extension-caffeine";
|
|
|
|
};
|
|
|
|
}
|