2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, glib, gnome, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "gnome-shell-extension-night-theme-switcher";
|
2021-02-05 17:12:51 +00:00
|
|
|
version = "40";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "rmnvgr";
|
|
|
|
repo = "nightthemeswitcher-gnome-shell-extension";
|
|
|
|
rev = "v${version}";
|
2021-02-05 17:12:51 +00:00
|
|
|
sha256 = "0z11y18bgdc0y41hrrzzgi4lagm2cg06x12jgdnary1ycng7xja0";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = [ glib gnome.gnome-shell ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
uuid = "nightthemeswitcher@romainvigier.fr";
|
|
|
|
|
|
|
|
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/
|
2020-09-25 04:45:31 +00:00
|
|
|
unzip build/${uuid}.shell-extension.zip -d $out/share/gnome-shell/extensions/${uuid}
|
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 = "Automatically change the GTK theme to dark variant when Night Light activates";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = with maintainers; [ jonafato ];
|
|
|
|
homepage = "https://gitlab.com/rmnvgr/nightthemeswitcher-gnome-shell-extension/";
|
|
|
|
};
|
|
|
|
}
|