2021-05-14 01:59:07 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glib, gettext, bash }:
|
2017-07-03 09:35:31 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-07 16:10:40 +01:00
|
|
|
pname = "gnome-shell-extension-caffeine";
|
2021-05-14 01:59:07 +02:00
|
|
|
version = "38";
|
2017-07-03 09:35:31 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eonpatapon";
|
|
|
|
repo = "gnome-shell-extension-caffeine";
|
2020-12-07 16:10:40 +01:00
|
|
|
rev = "v${version}";
|
2021-05-14 01:59:07 +02:00
|
|
|
sha256 = "0dyagnjmk91h96xr98mc177c473bqpxcv86qf6g3kyh3arwa9shs";
|
2017-07-03 09:35:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
uuid = "caffeine@patapon.info";
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
glib gettext
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2020-07-18 13:06:33 +02:00
|
|
|
runHook preBuild
|
2017-07-03 09:35:31 +02:00
|
|
|
${bash}/bin/bash ./update-locale.sh
|
2018-08-30 19:45:19 +02:00
|
|
|
glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas
|
2020-07-18 13:06:33 +02:00
|
|
|
runHook postBuild
|
2017-07-03 09:35:31 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-07-18 13:06:33 +02:00
|
|
|
runHook preInstall
|
2017-07-03 09:35:31 +02:00
|
|
|
mkdir -p $out/share/gnome-shell/extensions
|
|
|
|
cp -r ${uuid} $out/share/gnome-shell/extensions
|
2020-07-18 13:06:33 +02:00
|
|
|
runHook postInstall
|
2017-07-03 09:35:31 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-07-03 09:35:31 +02:00
|
|
|
description = "Fill the cup to inhibit auto suspend and screensaver";
|
2021-05-14 01:59:07 +02:00
|
|
|
license = licenses.gpl2Only;
|
2017-07-03 09:35:31 +02:00
|
|
|
maintainers = with maintainers; [ eperuffo ];
|
2020-03-23 18:22:54 +01:00
|
|
|
homepage = "https://github.com/eonpatapon/gnome-shell-extension-caffeine";
|
2017-07-03 09:35:31 +02:00
|
|
|
};
|
|
|
|
}
|