xdg-utils: add missing perl dependencies

Or else `xdg-screensaver suspend <WINDOW_ID>` fails with errors like:

  Can't locate Net/DBus.pm in @INC [...]

This increases the closure of xdg-utils from 53 MiB to 119 MiB.

(The issue was found when testing retroarch.)
This commit is contained in:
Bjørn Forsman 2019-09-24 22:07:47 +02:00
parent 8cc9d24fe1
commit e584eba7f8

@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchFromGitHub
, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
, w3m, gnugrep, gnused, coreutils, xset
, w3m, gnugrep, gnused, coreutils, xset, perlPackages
, mimiSupport ? false, gawk ? null }:
assert mimiSupport -> gawk != null;
@ -13,6 +13,11 @@ let
rev = "8e0070f17bcd3612ee83cb84e663e7c7fabcca3d";
sha256 = "15gw2nyrqmdsdin8gzxihpn77grhk9l97jp7s7pr7sl4n9ya2rpj";
};
perlPath = with perlPackages; makePerlPath [
NetDBus XMLTwig XMLParser X11Protocol
];
in
stdenv.mkDerivation rec {
@ -39,6 +44,7 @@ stdenv.mkDerivation rec {
awk() { ${gawk}/bin/awk "$@"; }\
sort() { ${coreutils}/bin/sort "$@"; }\
xset() { ${xset}/bin/xset "$@"; }\
perl() { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\
&#' -i "$out"/bin/*
substituteInPlace $out/bin/xdg-open \