perl: don't use libxcrypt on FreeBSD

Tested by building pkgsCross.x86_64-freebsd.perl from x86_64-linux.
This commit is contained in:
Alyssa Ross 2023-01-18 12:07:00 +00:00
parent f46ee73ba6
commit b0997077e7
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -36,7 +36,16 @@ let
optional crossCompiling "mini";
setOutputFlags = false;
propagatedBuildInputs = lib.optional enableCrypt libxcrypt;
# On FreeBSD, if Perl is built with threads support, having
# libxcrypt available will result in a build failure, because
# perl.h will get conflicting definitions of struct crypt_data
# from libc's unistd.h and libxcrypt's crypt.h.
#
# FreeBSD Ports has the same issue building the perl port if
# the libxcrypt port has been installed.
#
# Without libxcrypt, Perl will still find FreeBSD's crypt functions.
propagatedBuildInputs = lib.optional (enableCrypt && !stdenv.isFreeBSD) libxcrypt;
disallowedReferences = [ stdenv.cc ];