diff --git a/lib/default.nix b/lib/default.nix index e4e3e7d325a4..ee10ec1448b6 100644 --- a/lib/default.nix +++ b/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 diff --git a/lib/strings.nix b/lib/strings.nix index 48420a367815..47c881cfbc7c 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -162,26 +162,6 @@ rec { */ makeBinPath = makeSearchPathOutput "bin" "bin"; - - /* Construct a perl search path (such as $PERL5LIB) - - Example: - pkgs = import { } - 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 { } - 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. diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index 0bb3fd53e853..05b06ca467e4 100644 --- a/nixos/lib/testing.nix +++ b/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}" ''; }; diff --git a/nixos/modules/config/users-groups.nix b/nixos/modules/config/users-groups.nix index 137ee243813d..c3f228c9bcc4 100644 --- a/nixos/modules/config/users-groups.nix +++ b/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} ''; diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index af0a3a2fcc88..00c4d5018bf5 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/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; }; diff --git a/nixos/modules/programs/command-not-found/command-not-found.nix b/nixos/modules/programs/command-not-found/command-not-found.nix index bbe7165c62fb..656c255fcb18 100644 --- a/nixos/modules/programs/command-not-found/command-not-found.nix +++ b/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 ]); }; diff --git a/nixos/modules/services/web-servers/lighttpd/collectd.nix b/nixos/modules/services/web-servers/lighttpd/collectd.nix index 35b5edced68b..e70c980d5243 100644 --- a/nixos/modules/services/web-servers/lighttpd/collectd.nix +++ b/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}" ) } diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 3a33b3f65d36..a1537ad3cedc 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/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} $@ diff --git a/nixos/modules/system/etc/etc.nix b/nixos/modules/system/etc/etc.nix index 7d43ba07ca57..57ade2880962 100644 --- a/nixos/modules/system/etc/etc.nix +++ b/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 ''; }; diff --git a/nixos/modules/testing/service-runner.nix b/nixos/modules/testing/service-runner.nix index 25490d671152..5ead75788e5c 100644 --- a/nixos/modules/testing/service-runner.nix +++ b/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; diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix index 58e8ecc4fcab..240729811352 100644 --- a/pkgs/applications/audio/abcde/default.nix +++ b/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" ]; diff --git a/pkgs/applications/audio/crip/default.nix b/pkgs/applications/audio/crip/default.nix index 0383af06795e..f7bf919c2212 100644 --- a/pkgs/applications/audio/crip/default.nix +++ b/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 ''; diff --git a/pkgs/applications/graphics/feh/default.nix b/pkgs/applications/graphics/feh/default.nix index bbc7a9b1d11b..a1ef5fcb4b6f 100644 --- a/pkgs/applications/graphics/feh/default.nix +++ b/pkgs/applications/graphics/feh/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { checkInputs = [ perlPackages.TestCommand ]; preCheck = '' - export PERL5LIB="${perlPackages.TestCommand}/lib/perl5/site_perl" + export PERL5LIB="${perlPackages.TestCommand}/${perlPackages.perl.libPrefix}" ''; doCheck = true; diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix index 7e7bf644ce79..5800fb6df3cf 100644 --- a/pkgs/applications/graphics/shutter/default.nix +++ b/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" diff --git a/pkgs/applications/misc/extract_url/default.nix b/pkgs/applications/misc/extract_url/default.nix index 389ac7dfb1fc..2b7888c9cd04 100644 --- a/pkgs/applications/misc/extract_url/default.nix +++ b/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; { diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix index 6e4fc2065885..957f0f7f68bb 100644 --- a/pkgs/applications/misc/ikiwiki/default.nix +++ b/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 \''} diff --git a/pkgs/applications/misc/qdirstat/default.nix b/pkgs/applications/misc/qdirstat/default.nix index cbbac11424ec..ab9029512a20 100644 --- a/pkgs/applications/misc/qdirstat/default.nix +++ b/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; { diff --git a/pkgs/applications/misc/rxvt_unicode/default.nix b/pkgs/applications/misc/rxvt_unicode/default.nix index 0e59ef5512d8..57ce1f081801 100644 --- a/pkgs/applications/misc/rxvt_unicode/default.nix +++ b/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 = '' diff --git a/pkgs/applications/misc/tilix/default.nix b/pkgs/applications/misc/tilix/default.nix index 98e320b7aaf5..eb7a8e41d4b0 100644 --- a/pkgs/applications/misc/tilix/default.nix +++ b/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' ) ''; diff --git a/pkgs/applications/misc/yarssr/default.nix b/pkgs/applications/misc/yarssr/default.nix index a8ff981400a9..a47fb93512db 100644 --- a/pkgs/applications/misc/yarssr/default.nix +++ b/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; { diff --git a/pkgs/applications/networking/irc/weechat/wrapper.nix b/pkgs/applications/networking/irc/weechat/wrapper.nix index 1e371bb8e223..70628722cbad 100644 --- a/pkgs/applications/networking/irc/weechat/wrapper.nix +++ b/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)} ''; }); }; diff --git a/pkgs/applications/networking/sieve-connect/default.nix b/pkgs/applications/networking/sieve-connect/default.nix index 472a26274f87..55d473bc104b 100644 --- a/pkgs/applications/networking/sieve-connect/default.nix +++ b/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 - TermReadKey TermReadLineGnu ])}" + TermReadKey TermReadLineGnu ]}" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/networking/tsung/default.nix b/pkgs/applications/networking/tsung/default.nix index 0ee6d45e369a..050c8502e077 100644 --- a/pkgs/applications/networking/tsung/default.nix +++ b/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; { diff --git a/pkgs/applications/science/biology/N3/default.nix b/pkgs/applications/science/biology/N3/default.nix index 3502ac3e51b7..d2dbcf185330 100644 --- a/pkgs/applications/science/biology/N3/default.nix +++ b/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/" ]; diff --git a/pkgs/applications/science/biology/conglomerate/default.nix b/pkgs/applications/science/biology/conglomerate/default.nix index c04bc84c156d..23182fcadc6b 100644 --- a/pkgs/applications/science/biology/conglomerate/default.nix +++ b/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/" ]; diff --git a/pkgs/applications/science/biology/inormalize/default.nix b/pkgs/applications/science/biology/inormalize/default.nix index 7ba054a592ea..9e63b92b24ed 100644 --- a/pkgs/applications/science/biology/inormalize/default.nix +++ b/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/" ]; diff --git a/pkgs/applications/science/biology/minc-tools/default.nix b/pkgs/applications/science/biology/minc-tools/default.nix index c680eda95d2f..033f78609e9a 100644 --- a/pkgs/applications/science/biology/minc-tools/default.nix +++ b/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/" ]; diff --git a/pkgs/applications/science/biology/minc-widgets/default.nix b/pkgs/applications/science/biology/minc-widgets/default.nix index 9084dfb2e1c3..497c39a52a4c 100644 --- a/pkgs/applications/science/biology/minc-widgets/default.nix +++ b/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 diff --git a/pkgs/applications/science/biology/mni_autoreg/default.nix b/pkgs/applications/science/biology/mni_autoreg/default.nix index 076ecd03a1b1..5901b696d642 100644 --- a/pkgs/applications/science/biology/mni_autoreg/default.nix +++ b/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 diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index e218872cca30..46e88b1e0fc4 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/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 ''; diff --git a/pkgs/applications/version-management/git-and-tools/gitweb/default.nix b/pkgs/applications/version-management/git-and-tools/gitweb/default.nix index ce251e11d328..a98dd5bc5862 100644 --- a/pkgs/applications/version-management/git-and-tools/gitweb/default.nix +++ b/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 diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix index 0606c58c09d5..010d4d2f86ad 100644 --- a/pkgs/applications/version-management/monotone/default.nix +++ b/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) diff --git a/pkgs/applications/version-management/vcsh/default.nix b/pkgs/applications/version-management/vcsh/default.nix index 0f0eec7ef9cd..a90eb531fe59 100644 --- a/pkgs/applications/version-management/vcsh/default.nix +++ b/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"; diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index ef520f68320a..6e932ce860f6 100644 --- a/pkgs/build-support/writers/default.nix +++ b/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) diff --git a/pkgs/development/libraries/hivex/default.nix b/pkgs/development/libraries/hivex/default.nix index b2e2dbd35a40..740d2d3244df 100644 --- a/pkgs/development/libraries/hivex/default.nix +++ b/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 diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index aad6365e4c2d..4e43ef91e79f 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/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 ''; diff --git a/pkgs/development/perl-modules/DBD-SQLite/default.nix b/pkgs/development/perl-modules/DBD-SQLite/default.nix index 5b6990810b39..98d98266db17 100644 --- a/pkgs/development/perl-modules/DBD-SQLite/default.nix +++ b/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; { diff --git a/pkgs/development/tools/misc/creduce/default.nix b/pkgs/development/tools/misc/creduce/default.nix index 66f1fff41902..a2b487a4bcce 100644 --- a/pkgs/development/tools/misc/creduce/default.nix +++ b/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', diff --git a/pkgs/development/tools/misc/csmith/default.nix b/pkgs/development/tools/misc/csmith/default.nix index a0040e4ed3e5..eff1af8cdb47 100644 --- a/pkgs/development/tools/misc/csmith/default.nix +++ b/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 \ diff --git a/pkgs/development/tools/misc/help2man/default.nix b/pkgs/development/tools/misc/help2man/default.nix index ca48af641968..29ed23117fba 100644 --- a/pkgs/development/tools/misc/help2man/default.nix +++ b/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 < $out/share/man/man1/ldap-schema-manager.1.gz wrapProgram $out/bin/schema2ldif \ - --prefix PERL5PATH : "${stdenv.lib.makePerlPath [ perlPackages.GetoptLong ]}" + --prefix PERL5PATH : "${perlPackages.makePerlPath [ perlPackages.GetoptLong ]}" ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/typesetting/docbook2odf/default.nix b/pkgs/tools/typesetting/docbook2odf/default.nix index 029227cd1186..7200909660bd 100644 --- a/pkgs/tools/typesetting/docbook2odf/default.nix +++ b/pkgs/tools/typesetting/docbook2odf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl, makeWrapper, zip, libxslt, PerlMagick }: +{ stdenv, fetchurl, perlPackages, makeWrapper, zip, libxslt }: stdenv.mkDerivation rec { name = "docbook2odf-0.244"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "10k44g0qqa37k30pfj8vz95j6zdzz0nmnqjq1lyahfs2h4glzgwb"; }; - buildInputs = [ perl makeWrapper ]; + buildInputs = [ perlPackages.perl makeWrapper ]; installPhase = '' mkdir -p "$out/bin/" @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { wrapProgram "$out/bin/docbook2odf" \ --prefix PATH : "${stdenv.lib.makeBinPath [ zip libxslt ]}" \ - --prefix PERL5PATH : "${stdenv.lib.makePerlPath [PerlMagick]}" + --prefix PERL5PATH : "${perlPackages.makePerlPath [ perlPackages.PerlMagick ]}" ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/typesetting/docbook2x/default.nix b/pkgs/tools/typesetting/docbook2x/default.nix index e38e4a1f0596..5309e4555b49 100644 --- a/pkgs/tools/typesetting/docbook2x/default.nix +++ b/pkgs/tools/typesetting/docbook2x/default.nix @@ -1,5 +1,4 @@ -{ fetchurl, stdenv, texinfo, perl -, XMLSAX, XMLSAXBase, XMLParser, XMLNamespaceSupport +{ fetchurl, stdenv, texinfo, perlPackages , groff, libxml2, libxslt, gnused, libiconv, opensp , docbook_xml_dtd_43 , makeWrapper }: @@ -16,9 +15,8 @@ stdenv.mkDerivation rec { # writes its output to stdout instead of creating a file. patches = [ ./db2x_texixml-to-stdout.patch ]; - buildInputs = [ perl texinfo groff libxml2 libxslt makeWrapper - XMLSAX XMLParser XMLNamespaceSupport opensp libiconv - ]; + buildInputs = [ texinfo groff libxml2 libxslt makeWrapper opensp libiconv ] + ++ (with perlPackages; [ perl XMLSAX XMLParser XMLNamespaceSupport ]); postConfigure = '' # Broken substitution is used for `perl/config.pl', which leaves literal @@ -36,10 +34,8 @@ stdenv.mkDerivation rec { do # XXX: We work around the fact that `wrapProgram' doesn't support # spaces below by inserting escaped backslashes. - wrapProgram $out/bin/$i --prefix PERL5LIB : \ - "${XMLSAX}/lib/perl5/site_perl:${XMLSAXBase}/lib/perl5/site_perl:${XMLParser}/lib/perl5/site_perl" \ - --prefix PERL5LIB : \ - "${XMLNamespaceSupport}/lib/perl5/site_perl" \ + wrapProgram $out/bin/$i \ + --prefix PERL5LIB : ${with perlPackages; makeFullPerlPath [XMLSAX XMLParser XMLNamespaceSupport]} \ --prefix XML_CATALOG_FILES "\ " \ "$out/share/docbook2X/dtd/catalog.xml\ $out/share/docbook2X/xslt/catalog.xml\ ${docbook_xml_dtd_43}/xml/dtd/docbook/catalog.xml" done diff --git a/pkgs/tools/virtualization/nixos-container/default.nix b/pkgs/tools/virtualization/nixos-container/default.nix index 0763536533f0..94a19c5375ea 100644 --- a/pkgs/tools/virtualization/nixos-container/default.nix +++ b/pkgs/tools/virtualization/nixos-container/default.nix @@ -1,11 +1,11 @@ -{ substituteAll, perl, perlPackages, shadow, utillinux }: +{ substituteAll, perlPackages, shadow, utillinux }: substituteAll { name = "nixos-container"; dir = "bin"; isExecutable = true; src = ./nixos-container.pl; - perl = "${perl}/bin/perl -I${perlPackages.FileSlurp}/lib/perl5/site_perl"; + perl = "${perlPackages.perl}/bin/perl -I${perlPackages.FileSlurp}/${perlPackages.perl.libPrefix}"; su = "${shadow.su}/bin/su"; inherit utillinux; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0be67af7d89c..f82c89cd43ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -667,7 +667,6 @@ in apg = callPackage ../tools/security/apg { }; apt = callPackage ../tools/package-management/apt { - inherit (perlPackages) Po4a; # include/c++/6.4.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory stdenv = overrideCC stdenv gcc5; }; @@ -2066,9 +2065,7 @@ in client-ip-echo = callPackage ../servers/misc/client-ip-echo { }; - cloc = callPackage ../tools/misc/cloc { - inherit (perlPackages) perl AlgorithmDiff ParallelForkManager RegexpCommon; - }; + cloc = callPackage ../tools/misc/cloc { }; cloog = callPackage ../development/libraries/cloog { isl = isl_0_14; @@ -2197,9 +2194,7 @@ in debianutils = callPackage ../tools/misc/debianutils { }; - debian-devscripts = callPackage ../tools/misc/debian-devscripts { - inherit (perlPackages) CryptSSLeay LWP TimeDate DBFile FileDesktopEntry; - }; + debian-devscripts = callPackage ../tools/misc/debian-devscripts { }; debootstrap = callPackage ../tools/misc/debootstrap { }; @@ -2301,15 +2296,11 @@ in dmg2img = callPackage ../tools/misc/dmg2img { }; - docbook2odf = callPackage ../tools/typesetting/docbook2odf { - inherit (perlPackages) PerlMagick; - }; + docbook2odf = callPackage ../tools/typesetting/docbook2odf { }; doas = callPackage ../tools/security/doas { }; - docbook2x = callPackage ../tools/typesetting/docbook2x { - inherit (perlPackages) XMLSAX XMLSAXBase XMLParser XMLNamespaceSupport; - }; + docbook2x = callPackage ../tools/typesetting/docbook2x { }; docbook2mdoc = callPackage ../tools/misc/docbook2mdoc { }; @@ -2543,9 +2534,7 @@ in ext4magic = callPackage ../tools/filesystems/ext4magic { }; - extract_url = callPackage ../applications/misc/extract_url { - inherit (perlPackages) MIMEtools HTMLParser CursesUI URIFind; - }; + extract_url = callPackage ../applications/misc/extract_url { }; extundelete = callPackage ../tools/filesystems/extundelete { }; @@ -2627,9 +2616,7 @@ in ferm = callPackage ../tools/networking/ferm { }; - fgallery = callPackage ../tools/graphics/fgallery { - inherit (perlPackages) ImageExifTool CpanelJSONXS; - }; + fgallery = callPackage ../tools/graphics/fgallery { }; flannel = callPackage ../tools/networking/flannel { }; @@ -4011,9 +3998,7 @@ in localtime = callPackage ../tools/system/localtime { }; - logcheck = callPackage ../tools/system/logcheck { - inherit (perlPackages) mimeConstruct; - }; + logcheck = callPackage ../tools/system/logcheck { }; logmein-hamachi = callPackage ../tools/networking/logmein-hamachi { }; @@ -4250,13 +4235,10 @@ in monit = callPackage ../tools/system/monit { }; moreutils = callPackage ../tools/misc/moreutils { - inherit (perlPackages) IPCRun TimeDate TimeDuration; docbook-xsl = docbook_xsl; }; - mosh = callPackage ../tools/networking/mosh { - inherit (perlPackages) IOTty; - }; + mosh = callPackage ../tools/networking/mosh { }; motuclient = callPackage ../applications/science/misc/motu-client { }; @@ -4754,9 +4736,7 @@ in inherit (darwin.apple_sdk.frameworks) IOKit; }; - pcsctools = callPackage ../tools/security/pcsctools { - inherit (perlPackages) pcscperl Glib Gtk2 Pango Cairo; - }; + pcsctools = callPackage ../tools/security/pcsctools { }; pcsc-cyberjack = callPackage ../tools/security/pcsc-cyberjack { }; @@ -5435,9 +5415,7 @@ in sleepyhead = callPackage ../applications/misc/sleepyhead {}; - slimrat = callPackage ../tools/networking/slimrat { - inherit (perlPackages) WWWMechanize LWP; - }; + slimrat = callPackage ../tools/networking/slimrat { }; slsnif = callPackage ../tools/misc/slsnif { }; @@ -5616,9 +5594,7 @@ in swagger-codegen = callPackage ../tools/networking/swagger-codegen { }; - swec = callPackage ../tools/networking/swec { - inherit (perlPackages) LWP URI HTMLParser HTTPServerSimple Parent; - }; + swec = callPackage ../tools/networking/swec { }; swfdec = callPackage ../tools/graphics/swfdec {}; @@ -5959,10 +5935,7 @@ in vcftools = callPackage ../applications/science/biology/vcftools { }; - vcsh = callPackage ../applications/version-management/vcsh { - inherit (perlPackages) ShellCommand TestMost TestDifferences TestDeep - TestException TestWarn; - }; + vcsh = callPackage ../applications/version-management/vcsh { }; vcstool = callPackage ../development/tools/vcstool { }; @@ -6268,7 +6241,6 @@ in weighttp = callPackage ../tools/networking/weighttp { }; wget = callPackage ../tools/networking/wget { - inherit (perlPackages) IOSocketSSL LWP; libpsl = null; }; @@ -8487,16 +8459,12 @@ in credstash = with python3Packages; toPythonApplication credstash; creduce = callPackage ../development/tools/misc/creduce { - inherit (perlPackages) perl - ExporterLite FileWhich GetoptTabular RegexpCommon TermReadKey; inherit (llvmPackages_6) llvm clang-unwrapped; }; cscope = callPackage ../development/tools/misc/cscope { }; - csmith = callPackage ../development/tools/misc/csmith { - inherit (perlPackages) perl SysCPU; - }; + csmith = callPackage ../development/tools/misc/csmith { }; csslint = callPackage ../development/web/csslint { }; @@ -8706,9 +8674,7 @@ in hcloud = callPackage ../development/tools/hcloud { }; - help2man = callPackage ../development/tools/misc/help2man { - inherit (perlPackages) LocaleGettext; - }; + help2man = callPackage ../development/tools/misc/help2man { }; heroku = callPackage ../development/tools/heroku { nodejs = nodejs-10_x; @@ -8726,9 +8692,7 @@ in icmake = callPackage ../development/tools/build-managers/icmake { }; - iconnamingutils = callPackage ../development/tools/misc/icon-naming-utils { - inherit (perlPackages) XMLSimple; - }; + iconnamingutils = callPackage ../development/tools/misc/icon-naming-utils { }; ikos = callPackage ../development/tools/analysis/ikos { inherit (llvmPackages_7) stdenv clang llvm; @@ -10265,9 +10229,7 @@ in hiredis = callPackage ../development/libraries/hiredis { }; - hivex = callPackage ../development/libraries/hivex { - inherit (perlPackages) IOStringy; - }; + hivex = callPackage ../development/libraries/hivex { }; hound = callPackage ../development/tools/misc/hound { }; @@ -10900,7 +10862,6 @@ in libguestfs-appliance = callPackage ../development/libraries/libguestfs/appliance.nix {}; libguestfs = callPackage ../development/libraries/libguestfs { - inherit (perlPackages) libintl_perl GetoptLong SysVirt; appliance = libguestfs-appliance; }; @@ -13432,16 +13393,12 @@ in diod = callPackage ../servers/diod { lua = lua5_1; }; - dkimproxy = callPackage ../servers/mail/dkimproxy { - inherit (perlPackages) Error MailDKIM MIMETools NetServer; - }; + dkimproxy = callPackage ../servers/mail/dkimproxy { }; dovecot = callPackage ../servers/mail/dovecot { }; dovecot_pigeonhole = callPackage ../servers/mail/dovecot/plugins/pigeonhole { }; - dspam = callPackage ../servers/mail/dspam { - inherit (perlPackages) libnet; - }; + dspam = callPackage ../servers/mail/dspam { }; etcd = callPackage ../servers/etcd { }; @@ -13776,7 +13733,7 @@ in monitoring-plugins = callPackage ../servers/monitoring/plugins { }; - inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { inherit (perlPackages) DBDsybase NetSNMP; }) + inherit (callPackage ../servers/monitoring/plugins/labs_consol_de.nix { }) check-mssql-health check-nwc-health check-ups-health; @@ -13937,10 +13894,7 @@ in supervise = callPackage ../tools/system/supervise { }; - spamassassin = callPackage ../servers/mail/spamassassin { - inherit (perlPackages) HTMLParser NetDNS NetAddrIP DBFile - HTTPDate MailDKIM LWP IOSocketSSL; - }; + spamassassin = callPackage ../servers/mail/spamassassin { }; deadpixi-sam-unstable = callPackage ../applications/editors/deadpixi-sam { }; deadpixi-sam = deadpixi-sam-unstable; @@ -15849,7 +15803,6 @@ in aacgain = callPackage ../applications/audio/aacgain { }; abcde = callPackage ../applications/audio/abcde { - inherit (perlPackages) MusicBrainz MusicBrainzDiscID; inherit (pythonPackages) eyeD3; }; @@ -17557,10 +17510,6 @@ in ike = callPackage ../applications/networking/ike { }; ikiwiki = callPackage ../applications/misc/ikiwiki { - inherit (perlPackages) TextMarkdown URI HTMLParser HTMLScrubber - HTMLTemplate TimeDate CGISession DBFile CGIFormBuilder LocaleGettext - RpcXML XMLSimple YAML YAMLLibYAML HTMLTree Filechdir - AuthenPassphrase NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay; inherit (perlPackages.override { pkgs = pkgs // { imagemagick = imagemagickBig;}; }) PerlMagick; }; @@ -21325,9 +21274,7 @@ in bcftools = callPackage ../applications/science/biology/bcftools { }; - conglomerate = callPackage ../applications/science/biology/conglomerate { - inherit (perlPackages) GetoptTabular MNI-Perllib; - }; + conglomerate = callPackage ../applications/science/biology/conglomerate { }; dcm2niix = callPackage ../applications/science/biology/dcm2niix { }; @@ -21345,9 +21292,7 @@ in igv = callPackage ../applications/science/biology/igv { }; - inormalize = callPackage ../applications/science/biology/inormalize { - inherit (perlPackages) GetoptTabular MNI-Perllib; - }; + inormalize = callPackage ../applications/science/biology/inormalize { }; iv = callPackage ../applications/science/biology/iv { neuron-version = neuron.version; @@ -21359,9 +21304,7 @@ in muscle = callPackage ../applications/science/biology/muscle { }; - n3 = callPackage ../applications/science/biology/N3 { - inherit (perlPackages) perl GetoptTabular MNI-Perllib; - }; + n3 = callPackage ../applications/science/biology/N3 { }; neuron = callPackage ../applications/science/biology/neuron { python = null; @@ -21375,17 +21318,11 @@ in mrbayes = callPackage ../applications/science/biology/mrbayes { }; - minc_tools = callPackage ../applications/science/biology/minc-tools { - inherit (perlPackages) TextFormat; - }; + minc_tools = callPackage ../applications/science/biology/minc-tools { }; - minc_widgets = callPackage ../applications/science/biology/minc-widgets { - inherit (perlPackages) GetoptTabular MNI-Perllib; - }; + minc_widgets = callPackage ../applications/science/biology/minc-widgets { }; - mni_autoreg = callPackage ../applications/science/biology/mni_autoreg { - inherit (perlPackages) GetoptTabular MNI-Perllib; - }; + mni_autoreg = callPackage ../applications/science/biology/mni_autoreg { }; minimap2 = callPackage ../applications/science/biology/minimap2 { }; @@ -22739,12 +22676,7 @@ in conf = config.slock.conf or null; }; - smokeping = callPackage ../tools/networking/smokeping { - inherit fping rrdtool; - inherit (perlPackages) - FCGI CGI CGIFast ConfigGrammar DigestHMAC NetTelnet - NetOpenSSH NetSNMP LWP IOTty perl NetDNS perlldap; - }; + smokeping = callPackage ../tools/networking/smokeping { }; snapraid = callPackage ../tools/filesystems/snapraid { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b2921a4313e4..58815148c9cd 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -30,6 +30,24 @@ let checkPhase = "./Build test"; }); + /* Construct a perl search path (such as $PERL5LIB) + + Example: + pkgs = import { } + makePerlPath [ pkgs.perlPackages.libnet ] + => "/nix/store/n0m1fk9c960d8wlrs62sncnadygqqc6y-perl-Net-SMTP-1.25/lib/perl5/site_perl" + */ + makePerlPath = stdenv.lib.makeSearchPathOutput "lib" perl.libPrefix; + + /* Construct a perl search path recursively including all dependencies (such as $PERL5LIB) + + Example: + pkgs = import { } + 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 (stdenv.lib.misc.closePropagation deps); + ack = buildPerlPackage rec { name = "ack-2.24"; @@ -4014,8 +4032,8 @@ let sha256 = "5509e532cdd0e3d91eda550578deaac29e2f008a12b64576e8c261bb92e8c2c1"; }; postInstall = stdenv.lib.optionalString (perl ? crossVersion) '' - mkdir -p $out/lib/perl5/site_perl/cross_perl/${perl.version}/DBI - cat > $out/lib/perl5/site_perl/cross_perl/${perl.version}/DBI.pm < $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI.pm < $out/lib/perl5/site_perl/cross_perl/${perl.version}/DBI/DBD.pm < $out/${perl.libPrefix}/cross_perl/${perl.version}/DBI/DBD.pm <