Merge pull request #148591: gnomeExtensions: fix ddterm

This commit is contained in:
piegames
2021-12-04 22:39:05 +01:00
committed by GitHub
@@ -1,8 +1,12 @@
{ lib
, ddcutil
, gjs
, gnome
, gobject-introspection
, xprop
, touchegg
, vte
, wrapGAppsHook
}:
let
# Helper method to reduce redundancy
@@ -25,6 +29,21 @@ super: lib.trivial.pipe super [
meta.maintainers = with lib.maintainers; [ eperuffo jtojnar rhoriguchi ];
}))
(patchExtension "ddterm@amezin.github.com" (old: {
# Requires gjs, zenity & vte via the typelib
nativeBuildInputs = [ gobject-introspection wrapGAppsHook ];
buildInputs = [ vte ];
postPatch = ''
for file in *.js com.github.amezin.ddterm; do
substituteInPlace $file --replace "gjs" "${gjs}/bin/gjs"
substituteInPlace $file --replace "zenity" "${gnome.zenity}/bin/zenity"
done
'';
postFixup = ''
wrapGApp "$out/share/gnome-shell/extensions/ddterm@amezin.github.com/com.github.amezin.ddterm"
'';
}))
(patchExtension "display-brightness-ddcutil@themightydeity.github.com" (old: {
# Has a hard-coded path to a run-time dependency
# https://github.com/NixOS/nixpkgs/issues/136111