summary refs log tree commit diff
path: root/pkgs/development/interpreters/perl
diff options
context:
space:
mode:
authorStig Palmquist <stig@stig.io>2022-04-03 22:31:05 +0200
committerStig Palmquist <stig@stig.io>2022-04-03 22:31:05 +0200
commitd1adf502779a07dfc602d12e40116249b3dabb00 (patch)
treec4fe9f9a6dd8eddb2f425393615744134bd18e4b /pkgs/development/interpreters/perl
parent7c1912fb9a7372337c5b324fa9f14d58c3ad115f (diff)
downloadnixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar.gz
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar.bz2
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar.lz
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar.xz
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.tar.zst
nixpkgs-d1adf502779a07dfc602d12e40116249b3dabb00.zip
perl: use pkgs.zlib instead of bundled zlib
Diffstat (limited to 'pkgs/development/interpreters/perl')
-rw-r--r--pkgs/development/interpreters/perl/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix
index f29e61d1105..81099b96745 100644
--- a/pkgs/development/interpreters/perl/default.nix
+++ b/pkgs/development/interpreters/perl/default.nix
@@ -1,6 +1,7 @@
 { config, lib, stdenv, fetchurl, fetchpatch, fetchFromGitHub, pkgs, buildPackages
 , callPackage
 , enableThreading ? true, coreutils, makeWrapper
+, zlib
 }:
 
 # Note: this package is used for bootstrapping fetchurl, and thus
@@ -115,6 +116,16 @@ let
         cf_by="nixpkgs"
         cf_time="$(date -d "@$SOURCE_DATE_EPOCH")"
         EOF
+
+        # Compress::Raw::Zlib should use our zlib package instead of the one
+        # included with the distribution
+        cat > ./cpan/Compress-Raw-Zlib/config.in <<EOF
+        BUILD_ZLIB   = False
+        INCLUDE      = ${zlib.dev}/include
+        LIB          = ${zlib.out}/lib
+        OLD_ZLIB     = False
+        GZIP_OS_CODE = AUTO_DETECT
+        EOF
       '' + optionalString stdenv.isDarwin ''
         substituteInPlace hints/darwin.sh --replace "env MACOSX_DEPLOYMENT_TARGET=10.3" ""
       '' + optionalString (!enableThreading) ''