gnomeExtensions: fix ddterm

It needs gjs, zenity & vte.

Fixes #125363.
This commit is contained in:
Michael Livshin 2021-12-04 16:09:37 +02:00
parent 5ffc828912
commit 96e01b7e16

View file

@ -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