lol

perlPackages.Paranoid: init at 2.05

authored by

Michael Brantley and committed by
Robert Helgesson
d4e71a23 07dc607a

+42
+23
pkgs/development/perl-modules/Paranoid-blessed-path.patch
··· 1 + diff -ru Paranoid-2.05/lib/Paranoid.pm /tmp/Paranoid-2.05/lib/Paranoid.pm 2 + --- Paranoid-2.05/lib/Paranoid.pm 2017-02-06 05:48:57.000000000 -0500 3 + +++ /tmp/Paranoid-2.05/lib/Paranoid.pm 2018-05-10 06:40:35.286313299 -0400 4 + @@ -61,7 +61,7 @@ 5 + 6 + my $path = shift; 7 + 8 + - $path = '/bin:/usr/bin' unless defined $path; 9 + + $path = '__BLESSED_PATH__' unless defined $path; 10 + 11 + delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; 12 + $ENV{PATH} = $path; 13 + Binary files Paranoid-2.05/lib/.Paranoid.pm.swp and /tmp/Paranoid-2.05/lib/.Paranoid.pm.swp differ 14 + diff -ru Paranoid-2.05/t/01_init_core.t /tmp/Paranoid-2.05/t/01_init_core.t 15 + --- Paranoid-2.05/t/01_init_core.t 2016-07-12 04:49:33.000000000 -0400 16 + +++ /tmp/Paranoid-2.05/t/01_init_core.t 2018-05-10 06:43:41.323183381 -0400 17 + @@ -35,5 +35,5 @@ 18 + ok( psecureEnv('/bin:/sbin'), 'psecureEnv 1' ); 19 + is( $ENV{PATH}, '/bin:/sbin', 'Validated PATH' ); 20 + ok( psecureEnv(), 'psecureEnv 2' ); 21 + -is( $ENV{PATH}, '/bin:/usr/bin', 'Validated PATH' ); 22 + +is( $ENV{PATH}, '__BLESSED_PATH__', 'Validated PATH' ); 23 +
+19
pkgs/top-level/perl-packages.nix
··· 11954 11954 }; 11955 11955 }; 11956 11956 11957 + Paranoid = buildPerlPackage rec { 11958 + name = "Paranoid-2.05"; 11959 + src = fetchurl { 11960 + url = "mirror://cpan/authors/id/C/CO/CORLISS/Paranoid/${name}.tar.gz"; 11961 + sha256 = "583dfa0279733531f360795ad1cf4aa652d537b2b0bbd3c6925d0c8d75cbb3df"; 11962 + }; 11963 + patches = [ ../development/perl-modules/Paranoid-blessed-path.patch ]; 11964 + preConfigure = '' 11965 + # Capture the path used when compiling this module as the "blessed" 11966 + # system path, analogous to the module's own use of '/bin:/sbin'. 11967 + sed -i "s#__BLESSED_PATH__#$PATH#" lib/Paranoid.pm t/01_init_core.t 11968 + ''; 11969 + meta = { 11970 + description = "General function library for safer, more secure programming"; 11971 + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 11972 + maintainers = [ maintainers.limeytexan ]; 11973 + }; 11974 + }; 11975 + 11957 11976 PARDist = buildPerlPackage { 11958 11977 name = "PAR-Dist-0.49"; 11959 11978 src = fetchurl {