Merge pull request #137131 from piegamesde/gnome-extensions
gnomeExtensions: add patch framework and fix extensions
This commit is contained in:
commit
786b429ace
@ -36,9 +36,12 @@ let
|
|||||||
echo "${metadata}" | base64 --decode > $out/metadata.json
|
echo "${metadata}" | base64 --decode > $out/metadata.json
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
buildCommand = ''
|
dontBuild = true;
|
||||||
|
installPhase = ''
|
||||||
|
runHook preInstall
|
||||||
mkdir -p $out/share/gnome-shell/extensions/
|
mkdir -p $out/share/gnome-shell/extensions/
|
||||||
cp -r -T $src $out/share/gnome-shell/extensions/${uuid}
|
cp -r -T . $out/share/gnome-shell/extensions/${uuid}
|
||||||
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
description = builtins.head (lib.splitString "\n" description);
|
description = builtins.head (lib.splitString "\n" description);
|
||||||
|
@ -60,17 +60,24 @@ in rec {
|
|||||||
gnome38Extensions = mapUuidNames (produceExtensionsList "38");
|
gnome38Extensions = mapUuidNames (produceExtensionsList "38");
|
||||||
gnome40Extensions = mapUuidNames (produceExtensionsList "40");
|
gnome40Extensions = mapUuidNames (produceExtensionsList "40");
|
||||||
|
|
||||||
gnomeExtensions = lib.recurseIntoAttrs (
|
gnomeExtensions = lib.trivial.pipe gnome40Extensions [
|
||||||
(mapReadableNames
|
# Apply some custom patches for automatically packaged extensions
|
||||||
(lib.attrValues (gnome40Extensions // (callPackages ./manuallyPackaged.nix {})))
|
(callPackage ./extensionOverrides.nix {})
|
||||||
)
|
# Add all manually packaged extensions
|
||||||
// lib.optionalAttrs (config.allowAliases or true) {
|
(extensions: extensions // (callPackages ./manuallyPackaged.nix {}))
|
||||||
|
# Map the extension UUIDs to readable names
|
||||||
|
(lib.attrValues)
|
||||||
|
(mapReadableNames)
|
||||||
|
# Add some aliases
|
||||||
|
(extensions: extensions // lib.optionalAttrs (config.allowAliases or true) {
|
||||||
unite-shell = gnomeExtensions.unite; # added 2021-01-19
|
unite-shell = gnomeExtensions.unite; # added 2021-01-19
|
||||||
arc-menu = gnomeExtensions.arcmenu; # added 2021-02-14
|
arc-menu = gnomeExtensions.arcmenu; # added 2021-02-14
|
||||||
|
|
||||||
nohotcorner = throw "gnomeExtensions.nohotcorner removed since 2019-10-09: Since 3.34, it is a part of GNOME Shell configurable through GNOME Tweaks.";
|
nohotcorner = throw "gnomeExtensions.nohotcorner removed since 2019-10-09: Since 3.34, it is a part of GNOME Shell configurable through GNOME Tweaks.";
|
||||||
mediaplayer = throw "gnomeExtensions.mediaplayer deprecated since 2019-09-23: retired upstream https://github.com/JasonLG1979/gnome-shell-extensions-mediaplayer/blob/master/README.md";
|
mediaplayer = throw "gnomeExtensions.mediaplayer deprecated since 2019-09-23: retired upstream https://github.com/JasonLG1979/gnome-shell-extensions-mediaplayer/blob/master/README.md";
|
||||||
remove-dropdown-arrows = throw "gnomeExtensions.remove-dropdown-arrows removed since 2021-05-25: The extensions has not seen an update sine GNOME 3.34. Furthermore, the functionality it provides is obsolete as of GNOME 40.";
|
remove-dropdown-arrows = throw "gnomeExtensions.remove-dropdown-arrows removed since 2021-05-25: The extensions has not seen an update sine GNOME 3.34. Furthermore, the functionality it provides is obsolete as of GNOME 40.";
|
||||||
}
|
})
|
||||||
);
|
# Make the set "public"
|
||||||
|
lib.recurseIntoAttrs
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
32
pkgs/desktops/gnome/extensions/extensionOverrides.nix
Normal file
32
pkgs/desktops/gnome/extensions/extensionOverrides.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
ddcutil,
|
||||||
|
gjs,
|
||||||
|
}:
|
||||||
|
# A set of overrides for automatically packaged extensions that require some small fixes.
|
||||||
|
# The input must be an attribute set with the extensions' UUIDs as keys and the extension
|
||||||
|
# derivations as values. Output is the same, but with patches applied.
|
||||||
|
#
|
||||||
|
# Note that all source patches refer to the built extension as published on extensions.gnome.org, and not
|
||||||
|
# the upstream repository's sources.
|
||||||
|
super: super // {
|
||||||
|
|
||||||
|
"display-brightness-ddcutil@themightydeity.github.com" = super."display-brightness-ddcutil@themightydeity.github.com".overrideAttrs (old: {
|
||||||
|
# Has a hard-coded path to a run-time dependency
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/136111
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace "extension.js" --replace "/usr/bin/ddcutil" "${ddcutil}/bin/ddcutil"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
"gnome-shell-screenshot@ttll.de" = super."gnome-shell-screenshot@ttll.de".overrideAttrs (old: {
|
||||||
|
# Requires gjs
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/136112
|
||||||
|
postPatch = ''
|
||||||
|
for file in *.js; do
|
||||||
|
substituteInPlace $file --replace "gjs" "${gjs}/bin/gjs"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, glib, gnome }:
|
{ stdenv, lib, fetchFromGitHub, glib, gnome }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "gnome-shell-extension-tilingnome-unstable";
|
pname = "gnome-shell-extension-tilingnome";
|
||||||
version = "unstable-2019-09-19";
|
version = "unstable-2019-09-19";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
Loading…
Reference in New Issue
Block a user