Browse Source

lib.makePerlPath -> perlPackages.makePerlPath

othernimblestuff
volth 3 years ago
parent
commit
bb9557eb7c
  1. 2
      lib/default.nix
  2. 20
      lib/strings.nix
  3. 4
      nixos/lib/testing.nix
  4. 4
      nixos/modules/config/users-groups.nix
  5. 2
      nixos/modules/installer/tools/tools.nix
  6. 2
      nixos/modules/programs/command-not-found/command-not-found.nix
  7. 2
      nixos/modules/services/web-servers/lighttpd/collectd.nix
  8. 2
      nixos/modules/system/boot/loader/grub/grub.nix
  9. 2
      nixos/modules/system/etc/etc.nix
  10. 2
      nixos/modules/testing/service-runner.nix
  11. 4
      pkgs/applications/audio/abcde/default.nix
  12. 5
      pkgs/applications/audio/crip/default.nix
  13. 2
      pkgs/applications/graphics/feh/default.nix
  14. 6
      pkgs/applications/graphics/shutter/default.nix
  15. 17
      pkgs/applications/misc/extract_url/default.nix
  16. 25
      pkgs/applications/misc/ikiwiki/default.nix
  17. 6
      pkgs/applications/misc/qdirstat/default.nix
  18. 4
      pkgs/applications/misc/rxvt_unicode/default.nix
  19. 1
      pkgs/applications/misc/tilix/default.nix
  20. 12
      pkgs/applications/misc/yarssr/default.nix
  21. 6
      pkgs/applications/networking/irc/weechat/wrapper.nix
  22. 12
      pkgs/applications/networking/sieve-connect/default.nix
  23. 6
      pkgs/applications/networking/tsung/default.nix
  24. 4
      pkgs/applications/science/biology/N3/default.nix
  25. 6
      pkgs/applications/science/biology/conglomerate/default.nix
  26. 4
      pkgs/applications/science/biology/inormalize/default.nix
  27. 4
      pkgs/applications/science/biology/minc-tools/default.nix
  28. 4
      pkgs/applications/science/biology/minc-widgets/default.nix
  29. 4
      pkgs/applications/science/biology/mni_autoreg/default.nix
  30. 65
      pkgs/applications/version-management/git-and-tools/git/default.nix
  31. 2
      pkgs/applications/version-management/git-and-tools/gitweb/default.nix
  32. 4
      pkgs/applications/version-management/monotone/default.nix
  33. 10
      pkgs/applications/version-management/vcsh/default.nix
  34. 4
      pkgs/build-support/writers/default.nix
  35. 7
      pkgs/development/libraries/hivex/default.nix
  36. 15
      pkgs/development/libraries/libguestfs/default.nix
  37. 4
      pkgs/development/perl-modules/DBD-SQLite/default.nix
  38. 5
      pkgs/development/tools/misc/creduce/default.nix
  39. 4
      pkgs/development/tools/misc/csmith/default.nix
  40. 9
      pkgs/development/tools/misc/help2man/default.nix
  41. 6
      pkgs/development/tools/misc/icon-naming-utils/default.nix
  42. 6
      pkgs/development/tools/sslmate/default.nix
  43. 4
      pkgs/development/web/wml/default.nix
  44. 10
      pkgs/os-specific/linux/apparmor/default.nix
  45. 6
      pkgs/servers/mail/dkimproxy/default.nix
  46. 6
      pkgs/servers/mail/dspam/default.nix
  47. 8
      pkgs/servers/mail/postgrey/default.nix
  48. 10
      pkgs/servers/mail/spamassassin/default.nix
  49. 14
      pkgs/servers/monitoring/munin/default.nix
  50. 3
      pkgs/servers/monitoring/net-snmp/default.nix
  51. 12
      pkgs/servers/monitoring/plugins/labs_consol_de.nix
  52. 10
      pkgs/servers/slimserver/default.nix
  53. 2
      pkgs/tools/backup/store-backup/default.nix
  54. 2
      pkgs/tools/filesystems/file-rename/default.nix
  55. 6
      pkgs/tools/graphics/fgallery/default.nix
  56. 2
      pkgs/tools/misc/arp-scan/default.nix
  57. 10
      pkgs/tools/misc/cloc/default.nix
  58. 10
      pkgs/tools/misc/debian-devscripts/default.nix
  59. 4
      pkgs/tools/misc/moreutils/default.nix
  60. 4
      pkgs/tools/misc/rrdtool/default.nix
  61. 4
      pkgs/tools/networking/infiniband-diags/default.nix
  62. 8
      pkgs/tools/networking/mosh/default.nix
  63. 6
      pkgs/tools/networking/slimrat/default.nix
  64. 13
      pkgs/tools/networking/smokeping/default.nix
  65. 2
      pkgs/tools/networking/swaks/default.nix
  66. 13
      pkgs/tools/networking/swec/default.nix
  67. 10
      pkgs/tools/networking/wget/default.nix
  68. 9
      pkgs/tools/package-management/apt/default.nix
  69. 2
      pkgs/tools/security/kpcli/default.nix
  70. 2
      pkgs/tools/security/monkeysphere/default.nix
  71. 11
      pkgs/tools/security/pcsctools/default.nix
  72. 14
      pkgs/tools/security/signing-party/default.nix
  73. 11
      pkgs/tools/system/logcheck/default.nix
  74. 6
      pkgs/tools/text/mb2md/default.nix
  75. 11
      pkgs/tools/text/namazu/default.nix
  76. 6
      pkgs/tools/text/schema2ldif/default.nix
  77. 6
      pkgs/tools/typesetting/docbook2odf/default.nix
  78. 14
      pkgs/tools/typesetting/docbook2x/default.nix
  79. 4
      pkgs/tools/virtualization/nixos-container/default.nix
  80. 122
      pkgs/top-level/all-packages.nix
  81. 30
      pkgs/top-level/perl-packages.nix

2
lib/default.nix

@ -80,7 +80,7 @@ let
inherit (strings) concatStrings concatMapStrings concatImapStrings
intersperse concatStringsSep concatMapStringsSep
concatImapStringsSep makeSearchPath makeSearchPathOutput
makeLibraryPath makeBinPath makePerlPath makeFullPerlPath optionalString
makeLibraryPath makeBinPath optionalString
hasPrefix hasSuffix stringToCharacters stringAsChars escape
escapeShellArg escapeShellArgs replaceChars lowerChars
upperChars toLower toUpper addContextFrom splitString

20
lib/strings.nix

@ -162,26 +162,6 @@ rec {
*/
makeBinPath = makeSearchPathOutput "bin" "bin";
/* Construct a perl search path (such as $PERL5LIB)
Example:
pkgs = import <nixpkgs> { }
makePerlPath [ pkgs.perlPackages.libnet ]
=> "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl"
*/
# FIXME(zimbatm): this should be moved in perl-specific code
makePerlPath = makeSearchPathOutput "lib" "lib/perl5/site_perl";
/* Construct a perl search path recursively including all dependencies (such as $PERL5LIB)
Example:
pkgs = import <nixpkgs> { }
makeFullPerlPath [ pkgs.perlPackages.CGI ]
=> "/nix/store/fddivfrdc1xql02h9q500fpnqy12c74n-perl-CGI-4.38/lib/perl5/site_perl:/nix/store/8hsvdalmsxqkjg0c5ifigpf31vc4vsy2-perl-HTML-Parser-3.72/lib/perl5/site_perl:/nix/store/zhc7wh0xl8hz3y3f71nhlw1559iyvzld-perl-HTML-Tagset-3.20/lib/perl5/site_perl"
*/
makeFullPerlPath = deps: makePerlPath (lib.misc.closePropagation deps);
/* Depending on the boolean `cond', return either the given string
or the empty string. Useful to concatenate against a bigger string.

4
nixos/lib/testing.nix

@ -34,14 +34,14 @@ in rec {
cp ${./test-driver/test-driver.pl} $out/bin/nixos-test-driver
chmod u+x $out/bin/nixos-test-driver
libDir=$out/lib/perl5/site_perl
libDir=$out/${perl.libPrefix}
mkdir -p $libDir
cp ${./test-driver/Machine.pm} $libDir/Machine.pm
cp ${./test-driver/Logger.pm} $libDir/Logger.pm
wrapProgram $out/bin/nixos-test-driver \
--prefix PATH : "${lib.makeBinPath [ qemu_test vde2 netpbm coreutils ]}" \
--prefix PERL5LIB : "${with perlPackages; lib.makePerlPath [ TermReadLineGnu XMLWriter IOTty FileSlurp ]}:$out/lib/perl5/site_perl"
--prefix PERL5LIB : "${with perlPackages; makePerlPath [ TermReadLineGnu XMLWriter IOTty FileSlurp ]}:$out/${perl.libPrefix}"
'';
};

4
nixos/modules/config/users-groups.nix

@ -534,8 +534,8 @@ in {
install -m 0755 -d /home
${pkgs.perl}/bin/perl -w \
-I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl \
-I${pkgs.perlPackages.JSON}/lib/perl5/site_perl \
-I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix} \
-I${pkgs.perlPackages.JSON}/${pkgs.perl.libPrefix} \
${./update-users-groups.pl} ${spec}
'';

2
nixos/modules/installer/tools/tools.nix

@ -37,7 +37,7 @@ let
name = "nixos-generate-config";
src = ./nixos-generate-config.pl;
path = [ pkgs.btrfs-progs ];
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl";
perl = "${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}";
inherit (config.system.nixos) release;
};

2
nixos/modules/programs/command-not-found/command-not-found.nix

@ -16,7 +16,7 @@ let
isExecutable = true;
inherit (pkgs) perl;
inherit (cfg) dbPath;
perlFlags = concatStrings (map (path: "-I ${path}/lib/perl5/site_perl ")
perlFlags = concatStrings (map (path: "-I ${path}/${pkgs.perl.libPrefix} ")
[ pkgs.perlPackages.DBI pkgs.perlPackages.DBDSQLite pkgs.perlPackages.StringShellQuote ]);
};

2
nixos/modules/services/web-servers/lighttpd/collectd.nix

@ -48,7 +48,7 @@ in
"/collectd" => "${cfg.collectionCgi}"
)
setenv.add-environment = (
"PERL5LIB" => "${with pkgs; lib.makePerlPath [ perlPackages.CGI perlPackages.HTMLParser perlPackages.URI rrdtool ]}",
"PERL5LIB" => "${with pkgs.perlPackages; makePerlPath [ CGI HTMLParser URI pkgs.rrdtool ]}",
"COLLECTION_CONF" => "${collectionConf}"
)
}

2
nixos/modules/system/boot/loader/grub/grub.nix

@ -586,7 +586,7 @@ in
in pkgs.writeScript "install-grub.sh" (''
#!${pkgs.runtimeShell}
set -e
export PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX XMLSAXBase ListCompare ])}
export PERL5LIB=${with pkgs.perlPackages; makePerlPath [ FileSlurp XMLLibXML XMLSAX XMLSAXBase ListCompare ]}
${optionalString cfg.enableCryptodisk "export GRUB_ENABLE_CRYPTODISK=y"}
'' + flip concatMapStrings cfg.mirroredBoots (args: ''
${pkgs.perl}/bin/perl ${install-grub-pl} ${grubConfig args} $@

2
nixos/modules/system/etc/etc.nix

@ -154,7 +154,7 @@ in
''
# Set up the statically computed bits of /etc.
echo "setting up /etc..."
${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl ${./setup-etc.pl} ${etc}/etc
${pkgs.perl}/bin/perl -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix} ${./setup-etc.pl} ${etc}/etc
'';
};

2
nixos/modules/testing/service-runner.nix

@ -6,7 +6,7 @@ let
makeScript = name: service: pkgs.writeScript "${name}-runner"
''
#! ${pkgs.perl}/bin/perl -w -I${pkgs.perlPackages.FileSlurp}/lib/perl5/site_perl
#! ${pkgs.perl}/bin/perl -w -I${pkgs.perlPackages.FileSlurp}/${pkgs.perl.libPrefix}
use File::Slurp;

4
pkgs/applications/audio/abcde/default.nix

@ -1,6 +1,6 @@
{ stdenv, fetchurl, libcdio-paranoia, cddiscid, wget, which, vorbis-tools, id3v2, eyeD3
, lame, flac, glyr
, perl, MusicBrainz, MusicBrainzDiscID
, perlPackages
, makeWrapper }:
let version = "2.9.2";
@ -29,7 +29,7 @@ in
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl MusicBrainz MusicBrainzDiscID ];
buildInputs = with perlPackages; [ perl MusicBrainz MusicBrainzDiscID ];
installFlags = [ "sysconfdir=$(out)/etc" ];

5
pkgs/applications/audio/crip/default.nix

@ -2,7 +2,6 @@
, fetchurl
, makeWrapper
, perl
, perlPackages
, cdparanoia
@ -26,7 +25,7 @@ stdenv.mkDerivation rec {
sha256 = "0pk9152wll6fmkj1pki3fz3ijlf06jyk32v31yarwvdkwrk7s9xz";
};
buildInputs = [ perl perlPackages.CDDB_get ];
buildInputs = [ perlPackages.perl perlPackages.CDDB_get ];
nativeBuildInputs = [ makeWrapper ];
toolDeps = makeBinPath [
@ -53,7 +52,7 @@ stdenv.mkDerivation rec {
--replace '$editor = "vim";' '$editor = "${nano}/bin/nano";'
wrapProgram $out/bin/$script \
--set PERL5LIB "${makePerlPath [ perlPackages.CDDB_get ]}" \
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.CDDB_get ]}" \
--set PATH "${toolDeps}"
done
'';

2
pkgs/applications/graphics/feh/default.nix

@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
checkInputs = [ perlPackages.TestCommand perlPackages.TestHarness ];
preCheck = ''
export PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl"
export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}"
'';
doCheck = true;

6
pkgs/applications/graphics/shutter/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg
{ stdenv, fetchurl, perlPackages, makeWrapper, imagemagick, gdk_pixbuf, librsvg
, hicolor-icon-theme, procps
}:
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl procps gdk_pixbuf librsvg ] ++ perlModules;
buildInputs = [ perlPackages.perl procps gdk_pixbuf librsvg ] ++ perlModules;
installPhase = ''
mkdir -p "$out"
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
(cd "$out" && mv CHANGES README COPYING "$out/share/doc/shutter")
wrapProgram $out/bin/shutter \
--set PERL5LIB "${stdenv.lib.makePerlPath perlModules}" \
--set PERL5LIB "${perlPackages.makePerlPath perlModules}" \
--prefix PATH : "${imagemagick.out}/bin" \
--suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"

17
pkgs/applications/misc/extract_url/default.nix

@ -1,14 +1,13 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, perl
, MIMEtools, HTMLParser
, cursesSupport ? true, CursesUI
, uriFindSupport ? true, URIFind
{ stdenv, lib, fetchFromGitHub, makeWrapper, perlPackages
, cursesSupport ? true
, uriFindSupport ? true
}:
let
perlDeps =
[ MIMEtools HTMLParser ]
++ lib.optional cursesSupport CursesUI
++ lib.optional uriFindSupport URIFind;
[ perlPackages.MIMEtools perlPackages.HTMLParser ]
++ lib.optional cursesSupport perlPackages.CursesUI
++ lib.optional uriFindSupport perlPackages.URIFind;
in stdenv.mkDerivation rec {
name = "extract_url-${version}";
@ -22,14 +21,14 @@ in stdenv.mkDerivation rec {
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ] ++ perlDeps;
buildInputs = [ perlPackages.perl ] ++ perlDeps;
makeFlags = [ "prefix=$(out)" ];
installFlags = [ "INSTALL=install" ];
postFixup = ''
wrapProgram "$out/bin/extract_url" \
--set PERL5LIB "${lib.makeFullPerlPath perlDeps}"
--set PERL5LIB "${perlPackages.makeFullPerlPath perlDeps}"
'';
meta = with lib; {

25
pkgs/applications/misc/ikiwiki/default.nix

@ -1,13 +1,9 @@
{ stdenv, fetchurl, perl, gettext, makeWrapper, PerlMagick, YAML
, TextMarkdown, URI, HTMLParser, HTMLScrubber, HTMLTemplate, TimeDate
, CGISession, CGIFormBuilder, DBFile, LocaleGettext, RpcXML, XMLSimple
, YAMLLibYAML, which, HTMLTree, AuthenPassphrase, NetOpenIDConsumer
, LWPxParanoidAgent, CryptSSLeay
{ stdenv, fetchurl, perlPackages, gettext, makeWrapper, PerlMagick, which
, gitSupport ? false, git ? null
, docutilsSupport ? false, python ? null, docutils ? null
, monotoneSupport ? false, monotone ? null
, bazaarSupport ? false, bazaar ? null
, cvsSupport ? false, cvs ? null, cvsps ? null, Filechdir ? null
, cvsSupport ? false, cvs ? null, cvsps ? null
, subversionSupport ? false, subversion ? null
, mercurialSupport ? false, mercurial ? null
, extraUtils ? []
@ -17,7 +13,7 @@ assert docutilsSupport -> (python != null && docutils != null);
assert gitSupport -> (git != null);
assert monotoneSupport -> (monotone != null);
assert bazaarSupport -> (bazaar != null);
assert cvsSupport -> (cvs != null && cvsps != null && Filechdir != null);
assert cvsSupport -> (cvs != null && cvsps != null && perlPackages.Filechdir != null);
assert subversionSupport -> (subversion != null);
assert mercurialSupport -> (mercurial != null);
@ -35,20 +31,21 @@ stdenv.mkDerivation {
sha256 = "00d7yzv426fvqbhvzyafddv7fa6b4j2647b0wi371wd5yjj9j3sz";
};
buildInputs = [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext
RpcXML XMLSimple PerlMagick YAML YAMLLibYAML which HTMLTree AuthenPassphrase
NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay ]
buildInputs = [ which ]
++ (with perlPackages; [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate
TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext
RpcXML XMLSimple PerlMagick YAML YAMLLibYAML HTMLTree AuthenPassphrase
NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay ])
++ lib.optionals docutilsSupport [python docutils]
++ lib.optionals gitSupport [git]
++ lib.optionals monotoneSupport [monotone]
++ lib.optionals bazaarSupport [bazaar]
++ lib.optionals cvsSupport [cvs cvsps Filechdir]
++ lib.optionals cvsSupport [cvs cvsps perlPackages.Filechdir]
++ lib.optionals subversionSupport [subversion]
++ lib.optionals mercurialSupport [mercurial];
patchPhase = ''
sed -i s@/usr/bin/perl@${perl}/bin/perl@ pm_filter mdwn2man
sed -i s@/usr/bin/perl@${perlPackages.perl}/bin/perl@ pm_filter mdwn2man
sed -i s@/etc/ikiwiki@$out/etc@ Makefile.PL
sed -i /ENV{PATH}/d ikiwiki.in
# State the gcc dependency, and make the cgi use our wrapper
@ -60,7 +57,7 @@ stdenv.mkDerivation {
postInstall = ''
for a in "$out/bin/"*; do
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perl}/bin:$out/bin \
wrapProgram $a --suffix PERL5LIB : $PERL5LIB --prefix PATH : ${perlPackages.perl}/bin:$out/bin \
${lib.optionalString gitSupport ''--prefix PATH : ${git}/bin \''}
${lib.optionalString monotoneSupport ''--prefix PATH : ${monotone}/bin \''}
${lib.optionalString bazaarSupport ''--prefix PATH : ${bazaar}/bin \''}

6
pkgs/applications/misc/qdirstat/default.nix

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, qmake
, coreutils, xdg_utils, bash
, perl, makeWrapper, perlPackages }:
, makeWrapper, perlPackages }:
let
version = "1.4";
@ -16,7 +16,7 @@ in stdenv.mkDerivation rec {
nativeBuildInputs = [ qmake makeWrapper ];
buildInputs = [ perl ];
buildInputs = [ perlPackages.perl ];
preBuild = ''
substituteInPlace scripts/scripts.pro \
@ -48,7 +48,7 @@ in stdenv.mkDerivation rec {
postInstall = ''
wrapProgram $out/bin/qdirstat-cache-writer \
--set PERL5LIB "${stdenv.lib.makePerlPath [ perlPackages.URI ]}"
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.URI ]}"
'';
meta = with stdenv.lib; {

4
pkgs/applications/misc/rxvt_unicode/default.nix

@ -51,8 +51,8 @@ stdenv.mkDerivation (rec {
''
# make urxvt find its perl file lib/perl5/site_perl is added to PERL5LIB automatically
+ stdenv.lib.optionalString perlSupport ''
mkdir -p $out/lib/perl5
ln -s $out/{lib/urxvt,lib/perl5/site_perl}
mkdir -p $(dirname ${perl.libPrefix})
ln -s $out/lib/urxvt $out/${perl.libPrefix}
'';
postInstall = ''

1
pkgs/applications/misc/tilix/default.nix

@ -21,7 +21,6 @@ stdenv.mkDerivation rec {
preBuild = ''
makeFlagsArray=(
PERL5LIB="${perlPackages.Po4a}/lib/perl5"
DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace'
)
'';

12
pkgs/applications/misc/yarssr/default.nix

@ -1,8 +1,4 @@
{
fetchFromGitHub, stdenv, lib,
makeWrapper, pkgs,
perl, perlPackages,
gnome2 }:
{ fetchFromGitHub, stdenv, lib, gettext, gtk2, makeWrapper, perlPackages, gnome2 }:
let
perlDeps = with perlPackages; [
@ -24,7 +20,7 @@ let
];
libs = [
stdenv.cc.cc.lib
pkgs.gtk2
gtk2
];
in
stdenv.mkDerivation rec {
@ -38,7 +34,7 @@ stdenv.mkDerivation rec {
sha256 = "0x7hz8x8qyp3i1vb22zhcnvwxm3jhmmmlr22jqc5b09vpmbw1l45";
};
nativeBuildInputs = [ perl pkgs.gettext makeWrapper ];
nativeBuildInputs = [ perlPackages.perl gettext makeWrapper ];
buildInputs = perlDeps ++ [gnome2.libglade];
propagatedBuildInputs = libs ++ perlDeps;
@ -55,7 +51,7 @@ stdenv.mkDerivation rec {
postFixup = ''
wrapProgram $out/bin/yarssr \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs} \
--set PERL5LIB "${lib.makePerlPath perlDeps}"
--set PERL5LIB "${perlPackages.makePerlPath perlDeps}"
'';
meta = with stdenv.lib; {

6
pkgs/applications/networking/irc/weechat/wrapper.nix

@ -1,5 +1,5 @@
{ stdenv, lib, runCommand, writeScriptBin, buildEnv
, pythonPackages, perl, perlPackages
, pythonPackages, perlPackages
}:
weechat:
@ -10,7 +10,7 @@ let
}:
let
perlInterpreter = perl;
perlInterpreter = perlPackages.perl;
availablePlugins = let
simplePlugin = name: {pluginFile = "${weechat.${name}}/lib/weechat/plugins/${name}.so";};
in rec {
@ -29,7 +29,7 @@ let
withPackages = pkgsFun: (perl // {
extraEnv = ''
${perl.extraEnv}
export PERL5LIB=${lib.makeFullPerlPath (pkgsFun perlPackages)}
export PERL5LIB=${perlPackages.makeFullPerlPath (pkgsFun perlPackages)}
'';
});
};

12
pkgs/applications/networking/sieve-connect/default.nix

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub, makeWrapper, perl, perlPackages }: stdenv.mkDerivation rec {
{ stdenv, fetchFromGitHub, makeWrapper, perlPackages }:
stdenv.mkDerivation rec {
name = "sieve-connect-${version}";
version = "0.89";
@ -9,7 +11,7 @@
sha256 = "0g7cv29wd5673inl4c87xb802k86bj6gcwh131xrbbg0a0g1c8fp";
};
buildInputs = [ perl ];
buildInputs = [ perlPackages.perl ];
nativeBuildInputs = [ makeWrapper ];
preBuild = ''
@ -20,7 +22,7 @@
echo "$(date +%Y-%m-%d)" > datefile
'';
buildFlags = [ "PERL5LIB=${stdenv.lib.makePerlPath [ perlPackages.FileSlurp ]}" "bin" "man" ];
buildFlags = [ "PERL5LIB=${perlPackages.makePerlPath [ perlPackages.FileSlurp ]}" "bin" "man" ];
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
@ -28,9 +30,9 @@
gzip -c sieve-connect.1 > $out/share/man/man1/sieve-connect.1.gz
wrapProgram $out/bin/sieve-connect \
--prefix PERL5LIB : "${stdenv.lib.makePerlPath (with perlPackages; [
--prefix PERL5LIB : "${with perlPackages; makePerlPath [
AuthenSASL Socket6 IOSocketInet6 IOSocketSSL NetSSLeay NetDNS PodUsage
TermReadKey TermReadLineGnu ])}"
TermReadKey TermReadLineGnu ]}"
'';
meta = with stdenv.lib; {

6
pkgs/applications/networking/tsung/default.nix

@ -1,7 +1,7 @@
{ fetchurl, stdenv, lib, makeWrapper,
erlang,
python2, python2Packages,
perl, perlPackages,
perlPackages,
gnuplot }:
stdenv.mkDerivation rec {
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [
erlang
gnuplot
perl
perlPackages.perl
perlPackages.TemplateToolkit
python2
python2Packages.matplotlib
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
# Add Template Toolkit and gnuplot to tsung_stats.pl
wrapProgram $out/bin/tsung_stats.pl \
--prefix PATH : ${lib.makeBinPath [ gnuplot ]} \
--set PERL5LIB "${lib.makePerlPath [ perlPackages.TemplateToolkit ]}"
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.TemplateToolkit ]}"
'';
meta = with stdenv.lib; {

4
pkgs/applications/science/biology/N3/default.nix

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper,
perl, MNI-Perllib, GetoptTabular,
perlPackages,
libminc, EBTKS }:
stdenv.mkDerivation rec {
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ libminc EBTKS ];
propagatedBuildInputs = [ perl MNI-Perllib GetoptTabular ];
propagatedBuildInputs = with perlPackages; [ perl MNI-Perllib GetoptTabular ];
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ];

6
pkgs/applications/science/biology/conglomerate/default.nix

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, coreutils, perl, bicpl, libminc, zlib, minc_tools,
makeWrapper, GetoptTabular, MNI-Perllib }:
{ stdenv, fetchFromGitHub, cmake, coreutils, perlPackages, bicpl, libminc, zlib, minc_tools,
makeWrapper }:
stdenv.mkDerivation rec {
pname = "conglomerate";
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ libminc zlib bicpl ];
propagatedBuildInputs = [ coreutils minc_tools perl GetoptTabular MNI-Perllib ];
propagatedBuildInputs = [ coreutils minc_tools ] ++ (with perlPackages; [ perl GetoptTabular MNI-Perllib ]);
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DBICPL_DIR=${bicpl}/lib/" ];

4
pkgs/applications/science/biology/inormalize/default.nix

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper,
perl, GetoptTabular, MNI-Perllib,
perlPackages,
libminc, EBTKS }:
stdenv.mkDerivation rec {
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ libminc EBTKS ];
propagatedBuildInputs = [ perl GetoptTabular MNI-Perllib ];
propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DEBTKS_DIR=${EBTKS}/lib/" ];

4
pkgs/applications/science/biology/minc-tools/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, flex, bison, perl, TextFormat, libminc, libjpeg, zlib }:
{ stdenv, fetchFromGitHub, cmake, makeWrapper, flex, bison, perlPackages, libminc, libjpeg, zlib }:
stdenv.mkDerivation rec {
pname = "minc-tools";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake flex bison makeWrapper ];
buildInputs = [ libminc libjpeg zlib ];
propagatedBuildInputs = [ perl TextFormat ];
propagatedBuildInputs = with perlPackages; [ perl TextFormat ];
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" ];

4
pkgs/applications/science/biology/minc-widgets/default.nix

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper,
perl, GetoptTabular, MNI-Perllib,
perlPackages,
libminc, octave, coreutils, minc_tools }:
stdenv.mkDerivation rec {
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ libminc ];
propagatedBuildInputs = [ perl GetoptTabular MNI-Perllib octave coreutils minc_tools ];
propagatedBuildInputs = (with perlPackages; [ perl GetoptTabular MNI-Perllib ]) ++ [ octave coreutils minc_tools ];
postFixup = ''
for p in $out/bin/*; do

4
pkgs/applications/science/biology/mni_autoreg/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, perl, GetoptTabular, MNI-Perllib, libminc }:
{ stdenv, fetchFromGitHub, cmake, makeWrapper, perlPackages, libminc }:
stdenv.mkDerivation rec {
pname = "mni_autoreg";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ libminc ];
propagatedBuildInputs = [ perl GetoptTabular MNI-Perllib ];
propagatedBuildInputs = with perlPackages; [ perl GetoptTabular MNI-Perllib ];
cmakeFlags = [ "-DLIBMINC_DIR=${libminc}/lib/" "-DBUILD_TESTING=FALSE" ];
# testing broken: './minc_wrapper: Permission denied' from Testing/ellipse0.mnc

65
pkgs/applications/version-management/git-and-tools/git/default.nix

@ -1,5 +1,5 @@
{ fetchurl, stdenv, buildPackages
, curl, openssl, zlib, expat, perl, python, gettext, cpio
, curl, openssl, zlib, expat, perlPackages, python, gettext, cpio
, gnugrep, gnused, gawk, coreutils # needed at runtime by git-filter-branch etc
, openssh, pcre2
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
@ -59,11 +59,11 @@ stdenv.mkDerivation {
--subst-var-by gettext ${gettext}
'';
nativeBuildInputs = [ gettext perl ]
nativeBuildInputs = [ gettext perlPackages.perl ]
++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
docbook_xsl docbook_xml_dtd_45 libxslt ];
buildInputs = [curl openssl zlib expat cpio makeWrapper libiconv]
++ stdenv.lib.optionals perlSupport [ perl ]
++ stdenv.lib.optionals perlSupport [ perlPackages.perl ]
++ stdenv.lib.optionals guiSupport [tcl tk]
++ stdenv.lib.optionals withpcre2 [ pcre2 ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.Security ]
@ -86,7 +86,7 @@ stdenv.mkDerivation {
"prefix=\${out}"
"SHELL_PATH=${stdenv.shell}"
]
++ (if perlSupport then ["PERL_PATH=${perl}/bin/perl"] else ["NO_PERL=1"])
++ (if perlSupport then ["PERL_PATH=${perlPackages.perl}/bin/perl"] else ["NO_PERL=1"])
++ (if pythonSupport then ["PYTHON_PATH=${python}/bin/python"] else ["NO_PYTHON=1"])
++ stdenv.lib.optionals stdenv.isSunOS ["INSTALL=install" "NO_INET_NTOP=" "NO_INET_PTON="]
++ (if stdenv.isDarwin then ["NO_APPLE_COMMON_CRYPTO=1"] else ["sysconfdir=/etc/"])
@ -152,7 +152,7 @@ stdenv.mkDerivation {
'${gnugrep}/bin/grep', '${gnused}/bin/sed', '${gawk}/bin/awk',
'${coreutils}/bin/cut', '${coreutils}/bin/basename', '${coreutils}/bin/dirname',
'${coreutils}/bin/wc', '${coreutils}/bin/tr'
${stdenv.lib.optionalString perlSupport ", '${perl}/bin/perl'"}
${stdenv.lib.optionalString perlSupport ", '${perlPackages.perl}/bin/perl'"}
);
}
foreach $c (@a) {
@ -173,50 +173,37 @@ stdenv.mkDerivation {
mv $out/share/gitweb $gitweb/
# wrap perl commands
gitperllib=$out/lib/perl5/site_perl
for i in ${builtins.toString perlLibs}; do
gitperllib=$gitperllib:$i/lib/perl5/site_perl
done
makeWrapper "$out/share/git/contrib/credential/netrc/git-credential-netrc" $out/bin/git-credential-netrc \
--set PERL5LIB "$gitperllib"
--set PERL5LIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-cvsimport \
--set GITPERLLIB "$gitperllib"
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-add--interactive \
--set GITPERLLIB "$gitperllib"
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-archimport \
--set GITPERLLIB "$gitperllib"
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-instaweb \
--set GITPERLLIB "$gitperllib"
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
wrapProgram $out/libexec/git-core/git-cvsexportcommit \
--set GITPERLLIB "$gitperllib"
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath perlLibs}"
''
+ (if svnSupport then
''# wrap git-svn
gitperllib=$out/lib/perl5/site_perl
for i in ${builtins.toString perlLibs} ${svn.out}; do
gitperllib=$gitperllib:$i/lib/perl5/site_perl
done
wrapProgram $out/libexec/git-core/git-svn \
--set GITPERLLIB "$gitperllib" \
+ (if svnSupport then ''
# wrap git-svn
wrapProgram $out/libexec/git-core/git-svn \
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath (perlLibs ++ [svn.out])}" \
--prefix PATH : "${svn.out}/bin" ''
else '' # replace git-svn by notification script
notSupported $out/libexec/git-core/git-svn
'')
+ (if sendEmailSupport then
''# wrap git-send-email
gitperllib=$out/lib/perl5/site_perl
for i in ${builtins.toString smtpPerlLibs}; do
gitperllib=$gitperllib:$i/lib/perl5/site_perl
done
'')
+ (if sendEmailSupport then ''
# wrap git-send-email
wrapProgram $out/libexec/git-core/git-send-email \
--set GITPERLLIB "$gitperllib" ''
else '' # replace git-send-email by notification script
--set GITPERLLIB "$out/${perlPackages.perl.libPrefix}:${perlPackages.makePerlPath smtpPerlLibs}"
'' else ''
# replace git-send-email by notification script
notSupported $out/libexec/git-core/git-send-email
'')
'')
+ stdenv.lib.optionalString withManual ''# Install man pages and Info manual
make -j $NIX_BUILD_CORES -l $NIX_BUILD_CORES PERL_PATH="${buildPackages.perl}/bin/perl" cmd-list.made install install-info \
@ -238,9 +225,9 @@ stdenv.mkDerivation {
+ stdenv.lib.optionalString stdenv.isDarwin ''
# enable git-credential-osxkeychain by default if darwin
cat > $out/etc/gitconfig << EOF
[credential]
helper = osxkeychain
EOF
[credential]
helper = osxkeychain
EOF
'';

2
pkgs/applications/version-management/git-and-tools/gitweb/default.nix

@ -24,7 +24,7 @@ in stdenv.mkDerivation {
$out/gitweb.cgi
# Give access to CGI.pm and friends (was removed from perl core in 5.22)
for p in ${stdenv.lib.concatStringsSep " " gitwebPerlLibs}; do
sed -i -e "/use CGI /i use lib \"$p/lib/perl5/site_perl\";" \
sed -i -e "/use CGI /i use lib \"$p/${perlPackages.perl.libPrefix}\";" \
"$out/gitweb.cgi"
done

4
pkgs/applications/version-management/monotone/default.nix

@ -27,8 +27,8 @@ stdenv.mkDerivation rec {
postInstall = ''
mkdir -p $out/share/${name}
cp -rv contrib/ $out/share/${name}/contrib
mkdir -p $out/lib/perl5/site_perl/${perlVersion}
cp -v contrib/Monotone.pm $out/lib/perl5/site_perl/${perlVersion}
mkdir -p $out/${perl.libPrefix}/${perlVersion}
cp -v contrib/Monotone.pm $out/${perl.libPrefix}/${perlVersion}
'';
#doCheck = true; # some tests fail (and they take VERY long)

10
pkgs/applications/version-management/vcsh/default.nix

@ -1,6 +1,4 @@
{ stdenv, fetchFromGitHub, which, git, ronn, perl, ShellCommand
, TestMost, TestDifferences, TestDeep, TestException, TestWarn
}:
{ stdenv, fetchFromGitHub, which, git, ronn, perlPackages }:
stdenv.mkDerivation rec {
version = "1.20170915"; # date of commit we're pulling
@ -13,10 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "1wfzp8167lcq6akdpbi8fikjv0z3h1i5minh3423dljc04q0klm1";
};
buildInputs = [
which git ronn perl ShellCommand TestMost TestDifferences TestDeep
TestException TestWarn
];
buildInputs = [ which git ronn ]
++ (with perlPackages; [ perl ShellCommand TestMost TestDifferences TestDeep TestException TestWarn ]);
installPhase = "make install PREFIX=$out";

4
pkgs/build-support/writers/default.nix

@ -192,12 +192,12 @@ rec {
name = "perl-environment";
paths = libraries;
pathsToLink = [
"/lib/perl5/site_perl"
"/${pkgs.perl.libPrefix}"
];
};
in
makeScriptWriter {
interpreter = "${pkgs.perl}/bin/perl -I ${perl-env}/lib/perl5/site_perl";
interpreter = "${pkgs.perl}/bin/perl -I ${perl-env}/${pkgs.perl.libPrefix}";
} name;
# writePerlBin takes the same arguments as writePerl but outputs a directory (like writeScriptBin)

7
pkgs/development/libraries/hivex/default.nix

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, autoreconfHook, makeWrapper
, perl, libxml2, IOStringy }:
, perlPackages, libxml2 }:
stdenv.mkDerivation rec {
name = "hivex-${version}";
@ -14,9 +14,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
autoreconfHook makeWrapper
perl libxml2 IOStringy
];
autoreconfHook makeWrapper libxml2
] ++ (with perlPackages; [ perl IOStringy ]);
postInstall = ''
for bin in $out/bin/*; do

15
pkgs/development/libraries/libguestfs/default.nix

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, autoreconfHook, makeWrapper
, ncurses, cpio, gperf, perl, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
, ncurses, cpio, gperf, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex
, gmp, readline, file, libintl_perl, GetoptLong, SysVirt, numactl, xen, libapparmor
, gmp, readline, file, numactl, xen, libapparmor
, getopt, perlPackages, ocamlPackages
, appliance ? null
, javaSupport ? false, jdk ? null }:
@ -20,11 +20,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
makeWrapper autoreconfHook ncurses cpio gperf perl
makeWrapper autoreconfHook ncurses cpio gperf
cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
systemd fuse yajl libvirt gmp readline file hivex libintl_perl GetoptLong
SysVirt numactl xen libapparmor getopt perlPackages.ModuleBuild
] ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ])
systemd fuse yajl libvirt gmp readline file hivex
numactl xen libapparmor getopt perlPackages.ModuleBuild
] ++ (with perlPackages; [ perl libintl_perl GetoptLong SysVirt ])
++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt ocaml_gettext ounit ])
++ stdenv.lib.optional javaSupport jdk;
prePatch = ''
@ -52,7 +53,7 @@ stdenv.mkDerivation rec {
for bin in $out/bin/*; do
wrapProgram "$bin" \
--prefix PATH : "$out/bin:${hivex}/bin:${qemu}/bin" \
--prefix PERL5LIB : "$out/lib/perl5/site_perl"
--prefix PERL5LIB : "$out/${perlPackages.perl.libPrefix}"
done
'';

4
pkgs/development/perl-modules/DBD-SQLite/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchurl, buildPerlPackage, DBI, sqlite }:
{ stdenv, fetchurl, buildPerlPackage, perl, DBI, sqlite }:
buildPerlPackage rec {
name = "DBD-SQLite-1.58";
@ -20,7 +20,7 @@ buildPerlPackage rec {
postInstall = ''
# Get rid of a pointless copy of the SQLite sources.
rm -rf $out/lib/perl5/site_perl/*/*/auto/share
rm -rf $out/${perl.libPrefix}/*/*/auto/share
'';
meta = with stdenv.lib; {

5
pkgs/development/tools/misc/creduce/default.nix

@ -2,7 +2,7 @@
, llvm, clang-unwrapped
, flex
, zlib
, perl, ExporterLite, FileWhich, GetoptTabular, RegexpCommon, TermReadKey
, perlPackages
, utillinux
}:
@ -22,8 +22,7 @@ stdenv.mkDerivation rec {
# Actual deps:
llvm clang-unwrapped
flex zlib
perl ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey
];
] ++ (with perlPackages; [ perl ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey ]);
# On Linux, c-reduce's preferred way to reason about
# the cpu architecture/topology is to use 'lscpu',

4
pkgs/development/tools/misc/csmith/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchurl, m4, makeWrapper, libbsd, perl, SysCPU }:
{ stdenv, fetchurl, m4, makeWrapper, libbsd, perlPackages }:
stdenv.mkDerivation rec {
name = "csmith-${version}";
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ m4 makeWrapper ];
buildInputs = [ perl SysCPU libbsd ];
buildInputs = [ libbsd ] ++ (with perlPackages; [ perl SysCPU ]);
postInstall = ''
substituteInPlace $out/bin/compiler_test.pl \

9
pkgs/development/tools/misc/help2man/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, gettext, LocaleGettext }:
{ stdenv, fetchurl, perlPackages, gettext }:
stdenv.mkDerivation rec {
name = "help2man-1.47.8";
@ -8,8 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "1p5830h88cx0zn0snwaj0vpph81xicpsirfwlxmcgjrlmn0nm3sj";
};
nativeBuildInputs = [ gettext LocaleGettext ];
buildInputs = [ perl LocaleGettext ];
nativeBuildInputs = [ gettext perlPackages.LocaleGettext ];
buildInputs = [ perlPackages.perl perlPackages.LocaleGettext ];
doCheck = false; # target `check' is missing
@ -18,11 +18,10 @@ stdenv.mkDerivation rec {
# We don't use makeWrapper here because it uses substitutions our
# bootstrap shell can't handle.
postInstall = ''
gettext_perl="$(echo ${LocaleGettext}/lib/perl*/site_perl)"
mv $out/bin/help2man $out/bin/.help2man-wrapped
cat > $out/bin/help2man <<EOF
#! $SHELL -e
export PERL5LIB=\''${PERL5LIB:+:}$gettext_perl
export PERL5LIB=\''${PERL5LIB:+:}${perlPackages.LocaleGettext}/${perlPackages.perl.libPrefix}
${stdenv.lib.optionalString stdenv.hostPlatform.isCygwin
''export PATH=\''${PATH:+:}${gettext}/bin''}
exec -a \$0 $out/bin/.help2man-wrapped "\$@"

6
pkgs/development/tools/misc/icon-naming-utils/default.nix

@ -1,4 +1,4 @@
{stdenv, fetchurl, perl, XMLSimple, librsvg}:
{stdenv, fetchurl, perlPackages, librsvg}:
stdenv.mkDerivation rec {
name = "icon-naming-utils-0.8.90";
@ -8,13 +8,13 @@ stdenv.mkDerivation rec {
sha256 = "071fj2jm5kydlz02ic5sylhmw6h2p3cgrm3gwdfabinqkqcv4jh4";
};
buildInputs = [perl XMLSimple librsvg];
buildInputs = [ librsvg ] ++ (with perlPackages; [ perl XMLSimple ]);
postInstall =
''
# Add XML::Simple to the runtime search path.
substituteInPlace $out/libexec/icon-name-mapping \
--replace '/bin/perl' '/bin/perl -I${XMLSimple}/lib/perl5/site_perl'
--replace '/bin/perl' '/bin/perl -I${perlPackages.XMLSimple}/${perlPackages.perl.libPrefix}'
'';
meta = with stdenv.lib; {

6
pkgs/development/tools/sslmate/default.nix

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perlPackages, perl, makeWrapper, openssl }:
{ stdenv, fetchurl, perlPackages, makeWrapper, openssl }:
stdenv.mkDerivation rec {
name = "sslmate-1.7.0";
@ -10,11 +10,11 @@ stdenv.mkDerivation rec {
makeFlags = "PREFIX=$(out)";
buildInputs = [ perl makeWrapper ];
buildInputs = [ perlPackages.perl makeWrapper ];
postInstall = ''
wrapProgram $out/bin/sslmate --prefix PERL5LIB : \
"${with perlPackages; stdenv.lib.makePerlPath [
"${with perlPackages; makePerlPath [
URI
JSONPP
TermReadKey

4
pkgs/development/web/wml/default.nix

@ -22,7 +22,7 @@ perlPackages.buildPerlPackage rec {
sed -i '/p2_mp4h\/doc/d' Makefile.in
'';
buildInputs = with perlPackages;
buildInputs = with perlPackages;
[ perl TermReadKey GD BitVector ncurses lynx makeWrapper ImageSize ];
patches = [ ./redhat-with-thr.patch ./dynaloader.patch ./no_bitvector.patch ];
@ -45,7 +45,7 @@ perlPackages.buildPerlPackage rec {
preFixup = ''
wrapProgram $out/bin/wml \
--set PERL5LIB ${with perlPackages; stdenv.lib.makePerlPath [
--set PERL5LIB ${with perlPackages; makePerlPath [
BitVector TermReadKey ImageSize
]}
'';

10
pkgs/os-specific/linux/apparmor/default.nix

@ -8,6 +8,7 @@
, swig
, ncurses
, pam
, libnotify
, buildPackages
}:
@ -79,6 +80,8 @@ let
dontDisableStatic = true;
prePatch = prePatchCommon + ''
substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.am --replace install_vendor install_site
substituteInPlace ./libraries/libapparmor/swig/perl/Makefile.in --replace install_vendor install_site
substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h"
substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h"
'';
@ -127,9 +130,10 @@ let
wrapProgram $out/bin/$prog --prefix PYTHONPATH : "$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
done
for prog in aa-notify ; do
wrapProgram $out/bin/$prog --prefix PERL5LIB : "${libapparmor}/lib/perl5:$PERL5LIB"
done
substituteInPlace $out/bin/aa-notify --replace /usr/bin/notify-send ${libnotify}/bin/notify-send
# aa-notify checks its name and does not work named ".aa-notify-wrapped"
mv $out/bin/aa-notify $out/bin/aa-notify-wrapped
makeWrapper ${perl}/bin/perl $out/bin/aa-notify --set PERL5LIB ${libapparmor}/${perl.libPrefix} --add-flags $out/bin/aa-notify-wrapped
'';
inherit doCheck;

6
pkgs/servers/mail/dkimproxy/default.nix

@ -1,4 +1,4 @@
{ stdenv, perl, fetchurl, Error, MailDKIM, MIMETools, NetServer }:
{ stdenv, perlPackages, fetchurl }:
let
pkg = "dkimproxy";
@ -23,8 +23,8 @@ stdenv.mkDerivation rec {
done
'';
buildInputs = [ perl ];
propagatedBuildInputs = [ Error MailDKIM MIMETools NetServer ];
buildInputs = [ perlPackages.perl ];
propagatedBuildInputs = with perlPackages; [ Error MailDKIM MIMETools NetServer ];
meta = with stdenv.lib; {
description = "SMTP-proxy that signs and/or verifies emails";

6
pkgs/servers/mail/dspam/default.nix

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, makeWrapper
, gawk, gnused, gnugrep, coreutils, which
, perl, libnet
, perlPackages
, withMySQL ? false, zlib, mysql57
, withPgSQL ? false, postgresql
, withSQLite ? false, sqlite
@ -25,7 +25,7 @@ in stdenv.mkDerivation rec {
sha256 = "1acklnxn1wvc7abn31l3qdj8q6k13s51k5gv86vka7q20jb5cxmf";
};
buildInputs = [ perl ]
buildInputs = [ perlPackages.perl ]
++ lib.optionals withMySQL [ zlib mysql57.connector-c ]
++ lib.optional withPgSQL postgresql
++ lib.optional withSQLite sqlite
@ -62,7 +62,7 @@ in stdenv.mkDerivation rec {
rm -rf $out/var
wrapProgram $out/bin/dspam_notify \
--set PERL5LIB "${lib.makePerlPath [ libnet ]}"
--set PERL5LIB "${perlPackages.makePerlPath [ perlPackages.libnet ]}"
# Install SQL scripts
mkdir -p $out/share/dspam/sql

8
pkgs/servers/mail/postgrey/default.nix

@ -1,7 +1,7 @@
{ stdenv, fetchurl, perl, perlPackages, lib, runCommand, postfix }:
{ stdenv, fetchurl, perlPackages, lib, runCommand, postfix }:
let
mk-perl-flags = inputs: lib.concatStringsSep " " (map (dep: "-I ${dep}/lib/perl5/site_perl") inputs);
mk-perl-flags = inputs: lib.concatStringsSep " " (map (dep: "-I ${dep}/${perlPackages.perl.libPrefix}") inputs);
postgrey-flags = mk-perl-flags (with perlPackages; [
NetServer BerkeleyDB DigestSHA1 NetAddrIP IOMultiplex
]);
@ -26,9 +26,9 @@ in runCommand name {
cd $out
tar -xzf $src --strip-components=1
mv postgrey policy-test bin
sed -i -e "s,#!/usr/bin/perl -T,#!${perl}/bin/perl -T ${postgrey-flags}," \
sed -i -e "s,#!/usr/bin/perl -T,#!${perlPackages.perl}/bin/perl -T ${postgrey-flags}," \
-e "s#/etc/postfix#$out#" \
bin/postgrey
sed -i -e "s,#!/usr/bin/perl,#!${perl}/bin/perl ${policy-test-flags}," \
sed -i -e "s,#!/usr/bin/perl,#!${perlPackages.perl}/bin/perl ${policy-test-flags}," \
bin/policy-test
''

10
pkgs/servers/mail/spamassassin/default.nix

@ -1,6 +1,4 @@