2023-10-13 15:00:55 +00:00
|
|
|
{ lib, fileset
|
|
|
|
, stdenv
|
|
|
|
, perl, perlPackages
|
|
|
|
, autoconf-archive, autoreconfHook, pkg-config
|
|
|
|
, nix, curl, bzip2, xz, boost, libsodium, darwin
|
|
|
|
}:
|
|
|
|
|
2024-01-26 20:54:33 +00:00
|
|
|
perl.pkgs.toPerlModule (stdenv.mkDerivation (finalAttrs: {
|
2023-10-13 15:00:55 +00:00
|
|
|
name = "nix-perl-${nix.version}";
|
|
|
|
|
|
|
|
src = fileset.toSource {
|
|
|
|
root = ../.;
|
2024-01-26 20:54:33 +00:00
|
|
|
fileset = fileset.unions ([
|
2023-10-13 15:00:55 +00:00
|
|
|
../.version
|
|
|
|
../m4
|
|
|
|
../mk
|
|
|
|
./MANIFEST
|
|
|
|
./Makefile
|
|
|
|
./Makefile.config.in
|
|
|
|
./configure.ac
|
|
|
|
./lib
|
|
|
|
./local.mk
|
2024-01-26 20:54:33 +00:00
|
|
|
] ++ lib.optionals finalAttrs.doCheck [
|
|
|
|
./.yath.rc
|
|
|
|
./t
|
|
|
|
]);
|
2023-10-13 15:00:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs =
|
|
|
|
[ autoconf-archive
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ nix
|
|
|
|
curl
|
|
|
|
bzip2
|
|
|
|
xz
|
|
|
|
perl
|
|
|
|
boost
|
|
|
|
]
|
|
|
|
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
2024-10-31 11:23:35 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security
|
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin darwin.apple_sdk.libs.sandbox;
|
2023-10-13 15:00:55 +00:00
|
|
|
|
2024-01-26 20:54:33 +00:00
|
|
|
# `perlPackages.Test2Harness` is marked broken for Darwin
|
|
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
perlPackages.Test2Harness
|
|
|
|
];
|
|
|
|
|
2023-10-13 15:00:55 +00:00
|
|
|
configureFlags = [
|
|
|
|
"--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
|
|
|
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postUnpack = "sourceRoot=$sourceRoot/perl";
|
2024-01-26 20:54:33 +00:00
|
|
|
}))
|