From d5003f5f737b055b0bb97df74004cce9d0c7f5fa Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Fri, 17 Aug 2018 09:13:44 -0400 Subject: [PATCH] added a helper function to make a PERL5LIB environment variable for a list of perlPackages and all associated runtime dependencies --- pkgs/top-level/perl-packages.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 7f09630debfc..51413009e685 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -28,6 +28,14 @@ let checkPhase = "./Build test"; }); + # Helper function to make a PERL5LIB environment variable for a list of perlPackages and all associated runtime dependencies + makePerl5Lib = deps: + with stdenv; + lib.concatStringsSep ":" [ + (lib.makePerlPath deps) + (lib.concatStringsSep ":" (map (dep: dep + "/lib/perl5/site_perl") (builtins.filter (dep: dep != null) (lib.flatten (map (dep: lib.getOutput "propagatedBuildInputs" dep) deps))))) + ] + ; ack = buildPerlPackage rec { name = "ack-2.24";