@@ -0,0 +1,36 @@
1+{ stdenv, fetchFromGitHub, glib, gettext, bash }:
2+
3+stdenv.mkDerivation rec {
4+ name = "gnome-shell-extension-caffeine-${version}";
5+ version = "unstable-2017-06-21";
6+
7+ src = fetchFromGitHub {
8+ owner = "eonpatapon";
9+ repo = "gnome-shell-extension-caffeine";
10+ rev = "ce0d0d4d3a9fed4b35b82cf59609a00502862271";
11+ sha256 = "01gf9c8nhhm78iakqf30900y6lywxks1pm5h2cs0jvp8d3ygd7sd";
12+ };
13+
14+ uuid = "caffeine@patapon.info";
15+
16+ nativeBuildInputs = [
17+ glib gettext
18+ ];
19+
20+ buildPhase = ''
21+ ${bash}/bin/bash ./update-locale.sh
22+ ${glib.dev}/bin/glib-compile-schemas --strict --targetdir=caffeine@patapon.info/schemas/ caffeine@patapon.info/schemas
23+ '';
24+
25+ installPhase = ''
26+ mkdir -p $out/share/gnome-shell/extensions
27+ cp -r ${uuid} $out/share/gnome-shell/extensions
28+ '';
29+
30+ meta = with stdenv.lib; {
31+ description = "Fill the cup to inhibit auto suspend and screensaver";
32+ license = licenses.gpl2;
33+ maintainers = with maintainers; [ eperuffo ];
34+ homepage = https://github.com/eonpatapon/gnome-shell-extension-caffeine;
35+ };
36+}