git.iko.soy/typeable/nixpkgs
on master help sign in
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.)

commite584eba7f8f2954dd53cca32e79634165f5333f3 authorBjørn Forsman <bjorn.forsman@gmail.com> dateTue 24 Sep 2019, 22:07 (7 years ago) parent8cc9d24
1 file changed+7−1
pkgs/tools/X11/xdg-utils/default.nix+7−1
pkgs/tools/X11/xdg-utils/default.nix+7−1
@@ -1,6 +1,6 @@
11{ stdenv, fetchurl, fetchFromGitHub
22, file, libxslt, docbook_xml_dtd_412, docbook_xsl, xmlto
3−, w3m, gnugrep, gnused, coreutils, xset
3+, w3m, gnugrep, gnused, coreutils, xset, perlPackages
44, mimiSupport ? false, gawk ? null }:
55
66assert mimiSupport -> gawk != null;
@@ -13,6 +13,11 @@ let
1313 rev = "8e0070f17bcd3612ee83cb84e663e7c7fabcca3d";
1414 sha256 = "15gw2nyrqmdsdin8gzxihpn77grhk9l97jp7s7pr7sl4n9ya2rpj";
1515 };
16+
17+ perlPath = with perlPackages; makePerlPath [
18+ NetDBus XMLTwig XMLParser X11Protocol
19+ ];
20+
1621in
1722
1823stdenv.mkDerivation rec {
@@ -39,6 +44,7 @@ stdenv.mkDerivation rec {
3944 awk() { ${gawk}/bin/awk "$@"; }\
4045 sort() { ${coreutils}/bin/sort "$@"; }\
4146 xset() { ${xset}/bin/xset "$@"; }\
47+ perl() { PERL5LIB=${perlPath} ${perlPackages.perl}/bin/perl "$@"; }\
4248 &#' -i "$out"/bin/*
4349
4450 substituteInPlace $out/bin/xdg-open \