perl: put perl dependencies in buildInputs instead of manually passing them to configure

Perl has an env hook[1]. Passing the paths manually without putting them
in buildInputs is harder to understand, plays less nicely with dev
shells, and is less build-generic.

Produced identical output on my x86_64-linux machine, and on my
aarch64-darwin machine was identical save for the derivation output path
which gets embedded into the .dylib Mach-O.

Change-Id: Ib313caa5a6f0b0e3154ce6f05379033920d0d290
This commit is contained in:
Qyriad 2024-03-30 14:34:46 -06:00
parent 5956f509b6
commit 2041bdac2d

View file

@ -36,15 +36,12 @@ perl.pkgs.toPerlModule (stdenv.mkDerivation {
xz xz
perl perl
boost boost
perlPackages.DBI
perlPackages.DBDSQLite
] ]
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
configureFlags = [
"--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
];
enableParallelBuilding = true; enableParallelBuilding = true;
postUnpack = "sourceRoot=$sourceRoot/perl"; postUnpack = "sourceRoot=$sourceRoot/perl";