8 , gobject-introspection
28 # Helper method to reduce redundancy
29 patchExtension = name: override: super: (super // {
30 ${name} = super.${name}.overrideAttrs override;
33 # A set of overrides for automatically packaged extensions that require some small fixes.
34 # The input must be an attribute set with the extensions' UUIDs as keys and the extension
35 # derivations as values. Output is the same, but with patches applied.
37 # Note that all source patches refer to the built extension as published on extensions.gnome.org, and not
38 # the upstream repository's sources.
39 super: lib.trivial.pipe super [
40 (patchExtension "caffeine@patapon.info" (old: {
41 meta.maintainers = with lib.maintainers; [ eperuffo ];
44 (patchExtension "dash-to-dock@micxgx.gmail.com" (old: {
45 meta.maintainers = with lib.maintainers; [ rhoriguchi ];
48 (patchExtension "ddterm@amezin.github.com" (old: {
49 nativeBuildInputs = [ gobject-introspection wrapGAppsHook3 ];
50 buildInputs = [ vte libhandy gjs ];
52 patchShebangs "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/bin/com.github.amezin.ddterm"
53 wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/bin/com.github.amezin.ddterm"
57 (patchExtension "display-brightness-ddcutil@themightydeity.github.com" (old: {
58 # Make glib-compile-schemas available
59 nativeBuildInputs = [ glib ];
60 # Has a hard-coded path to a run-time dependency
61 # https://github.com/NixOS/nixpkgs/issues/136111
63 substituteInPlace "schemas/org.gnome.shell.extensions.display-brightness-ddcutil.gschema.xml" \
64 --replace-fail "/usr/bin/ddcutil" ${lib.getExe ddcutil}
67 rm "$out/share/gnome-shell/extensions/display-brightness-ddcutil@themightydeity.github.com/schemas/gschemas.compiled"
68 glib-compile-schemas "$out/share/gnome-shell/extensions/display-brightness-ddcutil@themightydeity.github.com/schemas"
72 (patchExtension "eepresetselector@ulville.github.io" (old: {
74 # Needed to find the currently set preset
76 src = ./extensionOverridesPatches/eepresetselector_at_ulville.github.io.patch;
77 easyeffects_gsettings_path = "${glib.getSchemaPath easyeffects}";
82 (patchExtension "freon@UshakovVasilii_Github.yahoo.com" (old: {
85 src = ./extensionOverridesPatches/freon_at_UshakovVasilii_Github.yahoo.com.patch;
86 inherit hddtemp liquidctl lm_sensors procps smartmontools;
93 (patchExtension "gnome-shell-screenshot@ttll.de" (old: {
95 # https://github.com/NixOS/nixpkgs/issues/136112
98 substituteInPlace $file --replace "gjs" "${gjs}/bin/gjs"
103 (patchExtension "gtk4-ding@smedius.gitlab.com" (old: {
104 nativeBuildInputs = [ wrapGAppsHook3 ];
108 util_linux = util-linux;
109 xdg_utils = xdg-utils;
110 src = ./extensionOverridesPatches/gtk4-ding_at_smedius.gitlab.com.patch;
111 nautilus_gsettings_path = "${glib.getSchemaPath nautilus}";
116 (patchExtension "pano@elhan.io" (final: prev: {
117 version = "v23-alpha3";
119 url = "https://github.com/oae/gnome-shell-pano/releases/download/${final.version}/pano@elhan.io.zip";
120 hash = "sha256-LYpxsl/PC8hwz0ZdH5cDdSZPRmkniBPUCqHQxB4KNhc=";
124 substituteInPlace extension.js \
125 --replace-fail "import Gda from 'gi://Gda?version>=5.0'" "imports.gi.GIRepository.Repository.prepend_search_path('${libgda}/lib/girepository-1.0'); const Gda = (await import('gi://Gda')).default" \
126 --replace-fail "import GSound from 'gi://GSound'" "imports.gi.GIRepository.Repository.prepend_search_path('${gsound}/lib/girepository-1.0'); const GSound = (await import('gi://GSound')).default"
130 (patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: {
133 src = ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch;
134 gtop_path = "${libgtop}/lib/girepository-1.0";
139 (patchExtension "system-monitor-next@paradoxxx.zero.gmail.com" (old: {
142 src = ./extensionOverridesPatches/system-monitor-next_at_paradoxxx.zero.gmail.com.patch;
143 gtop_path = "${libgtop}/lib/girepository-1.0";
146 meta.maintainers = with lib.maintainers; [ andersk ];
149 (patchExtension "tophat@fflewddur.github.io" (old: {
152 src = ./extensionOverridesPatches/tophat_at_fflewddur.github.io.patch;
153 gtop_path = "${libgtop}/lib/girepository-1.0";
158 (patchExtension "Vitals@CoreCoding.com" (old: {
161 src = ./extensionOverridesPatches/vitals_at_corecoding.com.patch;
162 gtop_path = "${libgtop}/lib/girepository-1.0";
167 (patchExtension "x11gestures@joseexposito.github.io" (old: {
168 # Extension can't find Touchegg
169 # https://github.com/NixOS/nixpkgs/issues/137621
171 substituteInPlace "src/touchegg/ToucheggConfig.js" \
172 --replace "GLib.build_filenamev([GLib.DIR_SEPARATOR_S, 'usr', 'share', 'touchegg', 'touchegg.conf'])" "'${touchegg}/share/touchegg/touchegg.conf'"