2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glib, gettext, bash, gnome3 }:
|
2017-07-03 09:35:31 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-07 16:10:40 +01:00
|
|
|
pname = "gnome-shell-extension-caffeine";
|
|
|
|
version = "37";
|
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}";
|
|
|
|
sha256 = "1mpa0fbpmv3pblb20dxj8iykn4ayvx89qffpcs67bzlq597zsbkb";
|
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";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|