2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, glib, gettext, bash, gnome3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-09 12:39:15 +00:00
|
|
|
pname = "gnome-shell-extension-caffeine";
|
|
|
|
version = "37";
|
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}";
|
|
|
|
sha256 = "1mpa0fbpmv3pblb20dxj8iykn4ayvx89qffpcs67bzlq597zsbkb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
uuid = "caffeine@patapon.info";
|
|
|
|
|
|
|
|
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
|
|
|
|
cp -r ${uuid} $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";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ eperuffo ];
|
|
|
|
homepage = "https://github.com/eonpatapon/gnome-shell-extension-caffeine";
|
|
|
|
};
|
|
|
|
}
|