2021-05-07 22:18:14 +01:00
|
|
|
{ lib, stdenv, fetchFromGitLab, glib, gnome, unzip }:
|
2019-10-26 20:47:42 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-shell-extension-night-theme-switcher";
|
2021-06-10 17:42:08 +01:00
|
|
|
version = "50";
|
2019-10-26 20:47:42 +01:00
|
|
|
|
2020-03-08 14:28:35 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "rmnvgr";
|
|
|
|
repo = "nightthemeswitcher-gnome-shell-extension";
|
2019-10-26 20:47:42 +01:00
|
|
|
rev = "v${version}";
|
2021-06-10 17:42:08 +01:00
|
|
|
sha256 = "0rs08kr3wizs1vpkmm6pbcvnn7rz47yrq7vnb1s8d58yda9a850d";
|
2019-10-26 20:47:42 +01:00
|
|
|
};
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2021-05-07 22:18:14 +01:00
|
|
|
buildInputs = [ glib gnome.gnome-shell ];
|
2020-03-08 14:28:35 +00:00
|
|
|
|
2021-05-29 16:34:26 +01:00
|
|
|
passthru = {
|
|
|
|
extensionUuid = "nightthemeswitcher@romainvigier.fr";
|
|
|
|
extensionPortalSlug = "night-theme-switcher";
|
|
|
|
};
|
2020-03-08 14:28:35 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2020-07-18 12:06:33 +01:00
|
|
|
runHook preInstall
|
2020-03-08 14:28:35 +00:00
|
|
|
mkdir -p $out/share/gnome-shell/extensions/
|
2021-05-29 20:55:35 +01:00
|
|
|
unzip "build/nightthemeswitcher@romainvigier.fr.shell-extension.zip" -d "$out/share/gnome-shell/extensions/nightthemeswitcher@romainvigier.fr"
|
2020-07-18 12:06:33 +01:00
|
|
|
runHook postInstall
|
2020-03-08 14:28:35 +00:00
|
|
|
'';
|
2019-10-26 20:47:42 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-26 20:47:42 +01:00
|
|
|
description = "Automatically change the GTK theme to dark variant when Night Light activates";
|
2021-06-10 17:42:08 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2019-10-26 20:47:42 +01:00
|
|
|
maintainers = with maintainers; [ jonafato ];
|
2020-03-08 14:28:35 +00:00
|
|
|
homepage = "https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/";
|
2019-10-26 20:47:42 +01:00
|
|
|
};
|
|
|
|
}
|