2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, ddcutil
|
2023-05-24 13:37:59 +00:00
|
|
|
, easyeffects
|
2021-10-04 12:37:57 +00:00
|
|
|
, gjs
|
2023-05-24 13:37:59 +00:00
|
|
|
, glib
|
2021-12-06 16:07:01 +00:00
|
|
|
, gnome
|
|
|
|
, gobject-introspection
|
2023-01-11 07:51:40 +00:00
|
|
|
, gsound
|
2022-03-30 09:31:56 +00:00
|
|
|
, hddtemp
|
2023-01-11 07:51:40 +00:00
|
|
|
, libgda
|
2023-05-24 13:37:59 +00:00
|
|
|
, libgtop
|
2024-06-05 15:53:02 +00:00
|
|
|
, libhandy
|
2022-03-30 09:31:56 +00:00
|
|
|
, liquidctl
|
|
|
|
, lm_sensors
|
|
|
|
, netcat-gnu
|
|
|
|
, nvme-cli
|
|
|
|
, procps
|
|
|
|
, smartmontools
|
2022-01-19 23:45:15 +00:00
|
|
|
, substituteAll
|
2021-12-06 16:07:01 +00:00
|
|
|
, touchegg
|
2023-07-15 17:15:38 +00:00
|
|
|
, util-linux
|
2021-12-06 16:07:01 +00:00
|
|
|
, vte
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-07-15 17:15:38 +00:00
|
|
|
, xdg-utils
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
2021-12-06 16:07:01 +00:00
|
|
|
let
|
|
|
|
# Helper method to reduce redundancy
|
|
|
|
patchExtension = name: override: super: (super // {
|
|
|
|
${name} = super.${name}.overrideAttrs override;
|
|
|
|
});
|
|
|
|
in
|
2021-10-01 09:20:50 +00:00
|
|
|
# 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.
|
2021-12-06 16:07:01 +00:00
|
|
|
super: lib.trivial.pipe super [
|
|
|
|
(patchExtension "caffeine@patapon.info" (old: {
|
|
|
|
meta.maintainers = with lib.maintainers; [ eperuffo ];
|
|
|
|
}))
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
(patchExtension "dash-to-dock@micxgx.gmail.com" (old: {
|
|
|
|
meta.maintainers = with lib.maintainers; [ rhoriguchi ];
|
|
|
|
}))
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
(patchExtension "ddterm@amezin.github.com" (old: {
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ gobject-introspection wrapGAppsHook3 ];
|
2024-06-05 15:53:02 +00:00
|
|
|
buildInputs = [ vte libhandy gjs ];
|
2021-12-06 16:07:01 +00:00
|
|
|
postFixup = ''
|
2024-06-05 15:53:02 +00:00
|
|
|
patchShebangs "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/bin/com.github.amezin.ddterm"
|
2024-01-02 11:29:13 +00:00
|
|
|
wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/bin/com.github.amezin.ddterm"
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
}))
|
|
|
|
|
|
|
|
(patchExtension "display-brightness-ddcutil@themightydeity.github.com" (old: {
|
2024-06-20 14:57:18 +00:00
|
|
|
# Make glib-compile-schemas available
|
|
|
|
nativeBuildInputs = [ glib ];
|
2021-10-01 09:20:50 +00:00
|
|
|
# Has a hard-coded path to a run-time dependency
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/136111
|
|
|
|
postPatch = ''
|
2024-06-20 14:57:18 +00:00
|
|
|
substituteInPlace "schemas/org.gnome.shell.extensions.display-brightness-ddcutil.gschema.xml" \
|
|
|
|
--replace-fail "/usr/bin/ddcutil" ${lib.getExe ddcutil}
|
|
|
|
'';
|
|
|
|
postFixup = ''
|
|
|
|
rm "$out/share/gnome-shell/extensions/display-brightness-ddcutil@themightydeity.github.com/schemas/gschemas.compiled"
|
|
|
|
glib-compile-schemas "$out/share/gnome-shell/extensions/display-brightness-ddcutil@themightydeity.github.com/schemas"
|
2021-10-01 09:20:50 +00:00
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
}))
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
(patchExtension "eepresetselector@ulville.github.io" (old: {
|
|
|
|
patches = [
|
|
|
|
# Needed to find the currently set preset
|
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/eepresetselector_at_ulville.github.io.patch;
|
|
|
|
easyeffects_gsettings_path = "${glib.getSchemaPath easyeffects}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
(patchExtension "freon@UshakovVasilii_Github.yahoo.com" (old: {
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/freon_at_UshakovVasilii_Github.yahoo.com.patch;
|
|
|
|
inherit hddtemp liquidctl lm_sensors procps smartmontools;
|
|
|
|
netcat = netcat-gnu;
|
|
|
|
nvmecli = nvme-cli;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
(patchExtension "gnome-shell-screenshot@ttll.de" (old: {
|
2021-10-01 09:20:50 +00:00
|
|
|
# Requires gjs
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/136112
|
|
|
|
postPatch = ''
|
|
|
|
for file in *.js; do
|
|
|
|
substituteInPlace $file --replace "gjs" "${gjs}/bin/gjs"
|
|
|
|
done
|
|
|
|
'';
|
2021-12-06 16:07:01 +00:00
|
|
|
}))
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
(patchExtension "gtk4-ding@smedius.gitlab.com" (old: {
|
2024-05-15 15:35:15 +00:00
|
|
|
nativeBuildInputs = [ wrapGAppsHook3 ];
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
inherit gjs util-linux xdg-utils;
|
|
|
|
util_linux = util-linux;
|
|
|
|
xdg_utils = xdg-utils;
|
|
|
|
src = ./extensionOverridesPatches/gtk4-ding_at_smedius.gitlab.com.patch;
|
|
|
|
nautilus_gsettings_path = "${glib.getSchemaPath gnome.nautilus}";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
(patchExtension "pano@elhan.io" (old: {
|
2024-04-21 15:54:59 +00:00
|
|
|
patches = [
|
2024-06-05 15:53:02 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/pano_at_elhan.io.patch;
|
|
|
|
inherit gsound libgda;
|
|
|
|
})
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
(patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: {
|
2023-01-11 07:51:40 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
2024-06-05 15:53:02 +00:00
|
|
|
src = ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch;
|
|
|
|
gtop_path = "${libgtop}/lib/girepository-1.0";
|
2023-01-11 07:51:40 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
(patchExtension "system-monitor-next@paradoxxx.zero.gmail.com" (old: {
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/system-monitor-next_at_paradoxxx.zero.gmail.com.patch;
|
|
|
|
gtop_path = "${libgtop}/lib/girepository-1.0";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
meta.maintainers = with lib.maintainers; [ andersk ];
|
|
|
|
}))
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
(patchExtension "tophat@fflewddur.github.io" (old: {
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/tophat_at_fflewddur.github.io.patch;
|
|
|
|
gtop_path = "${libgtop}/lib/girepository-1.0";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
(patchExtension "Vitals@CoreCoding.com" (old: {
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./extensionOverridesPatches/vitals_at_corecoding.com.patch;
|
|
|
|
gtop_path = "${libgtop}/lib/girepository-1.0";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
}))
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
(patchExtension "x11gestures@joseexposito.github.io" (old: {
|
|
|
|
# Extension can't find Touchegg
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/137621
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace "src/touchegg/ToucheggConfig.js" \
|
|
|
|
--replace "GLib.build_filenamev([GLib.DIR_SEPARATOR_S, 'usr', 'share', 'touchegg', 'touchegg.conf'])" "'${touchegg}/share/touchegg/touchegg.conf'"
|
|
|
|
'';
|
|
|
|
}))
|
|
|
|
]
|