Skip to content

Commit

Permalink
perl: use pkgs.zlib instead of bundled zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
stigtsp committed Apr 3, 2022
1 parent 7c1912f commit d1adf50
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkgs/development/interpreters/perl/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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) ''
Expand Down

0 comments on commit d1adf50

Please sign in to comment.