nixpkgs-suyu/pkgs/desktops/gnome/extensions/clock-override/default.nix
piegames bffbf4617a gnomeExtensions: integrate manually packaged extensions better with the others
Their keys are now not used directly. Instead, we go the standard route of mapping to the
UUID in order to apply the rename procedure. This makes sure the manual override always does
the correct thing, and also gives us more consistency overall.
2021-07-14 03:35:11 +02:00

40 lines
1.3 KiB
Nix

{ lib, stdenv, fetchzip, gnome, gettext, glib }:
stdenv.mkDerivation rec {
pname = "gnome-shell-extension-clock-override";
version = "12";
src = fetchzip {
url = "https://extensions.gnome.org/extension-data/clock-overridegnomeshell.kryogenix.org.v${version}.shell-extension.zip";
sha256 = "1cyaszks6bwnbgacqsl1pmr24mbj05mad59d4253la9am8ibb4m6";
stripRoot = false;
};
passthru = {
extensionUuid = "clock-override@gnomeshell.kryogenix.org";
extensionPortalSlug = "clock-override";
};
nativeBuildInputs = [ gettext glib ];
buildPhase = ''
runHook preBuild
glib-compile-schemas --strict --targetdir=schemas schemas
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p "$out/share/gnome-shell/extensions/clock-override@gnomeshell.kryogenix.org"
cp -r {convenience.js,extension.js,format.js,locale,metadata.json,prefs.js,schemas} "$out/share/gnome-shell/extensions/clock-override@gnomeshell.kryogenix.org"
runHook postInstall
'';
meta = with lib; {
description = "Customize the date and time format displayed in clock in the top bar in GNOME Shell";
license = licenses.mit;
maintainers = with maintainers; [ rhoriguchi ];
homepage = "https://github.com/stuartlangridge/gnome-shell-clock-override";
broken = versionOlder gnome.gnome-shell.version "3.18";
};
}