From b59a5fac8e751e6841e87f4ed6fca421724c94e6 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Tue, 29 Dec 2020 16:32:11 +0100 Subject: [PATCH] hibernate-button: Init at 20 --- default.nix | 1 + .../hibernate-button.nix | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/gnome-shell-extensions/hibernate-button.nix diff --git a/default.nix b/default.nix index a15b309..90587eb 100644 --- a/default.nix +++ b/default.nix @@ -10,5 +10,6 @@ rec { gnomeExtensions = (super.gnomeExtensions or {}) // { hide-activities = callPackage ./pkgs/gnome-shell-extensions/hide-activities.nix {}; + hibernate-button = callPackage ./pkgs/gnome-shell-extensions/hibernate-button.nix {}; }; } diff --git a/pkgs/gnome-shell-extensions/hibernate-button.nix b/pkgs/gnome-shell-extensions/hibernate-button.nix new file mode 100644 index 0000000..0c978eb --- /dev/null +++ b/pkgs/gnome-shell-extensions/hibernate-button.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchzip }: + +stdenv.mkDerivation rec { + pname = "hibernate-button"; + version = "20"; + + src = fetchzip { + url = "https://extensions.gnome.org/extension-data/hibernate-statusdromi.v${version}.shell-extension.zip"; + sha256 = "1106s8pimsamfhjxwnyjb5hvcz0jxf7k416d9w5m71n1i0sgfnnn"; + stripRoot = false; + }; + + uuid = "hibernate-status@dromi"; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/share/gnome-shell/extensions/${uuid} + cp confirmDialog.js extension.js metadata.json prefs.js $out/share/gnome-shell/extensions/${uuid} + cp -r schemas $out/share/gnome-shell/extensions/${uuid} + ''; + + meta = with stdenv.lib; { + description = "Gnome Shell extension that adds a hibernate/hybrid suspend button in Status menu"; + homepage = "https://github.com/arelange/gnome-shell-extension-hibernate-status"; + license = licenses.gpl2; + }; +}