2024-04-04 23:07:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fileset,
|
|
|
|
stdenv,
|
|
|
|
perl,
|
|
|
|
perlPackages,
|
|
|
|
autoconf-archive,
|
|
|
|
autoreconfHook,
|
|
|
|
pkg-config,
|
|
|
|
nix,
|
|
|
|
curl,
|
|
|
|
bzip2,
|
|
|
|
xz,
|
|
|
|
boost,
|
|
|
|
libsodium,
|
|
|
|
darwin,
|
|
|
|
meson,
|
|
|
|
ninja,
|
|
|
|
buildWithMeson ? false,
|
2024-03-04 03:37:44 +00:00
|
|
|
}:
|
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
perl.pkgs.toPerlModule (
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "nix-perl-${nix.version}";
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
src = fileset.toSource {
|
|
|
|
root = ../.;
|
|
|
|
fileset = fileset.unions (
|
|
|
|
[
|
|
|
|
../.version
|
|
|
|
./lib
|
|
|
|
]
|
|
|
|
++ lib.optionals (!buildWithMeson) [
|
|
|
|
# FIXME(Qyriad): What the hell is this?
|
|
|
|
# What is it used for and do we still need it?
|
|
|
|
./MANIFEST
|
|
|
|
../m4
|
|
|
|
../mk
|
|
|
|
./Makefile
|
|
|
|
./Makefile.config.in
|
|
|
|
./configure.ac
|
|
|
|
./local.mk
|
|
|
|
]
|
|
|
|
++ lib.optionals buildWithMeson [ ./meson.build ]
|
|
|
|
);
|
|
|
|
};
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
nativeBuildInputs =
|
|
|
|
[ pkg-config ]
|
|
|
|
++ lib.optionals (!buildWithMeson) [
|
|
|
|
autoconf-archive
|
|
|
|
autoreconfHook
|
|
|
|
]
|
|
|
|
++ lib.optionals buildWithMeson [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
];
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
nix
|
|
|
|
curl
|
|
|
|
bzip2
|
|
|
|
xz
|
|
|
|
perl
|
|
|
|
boost
|
|
|
|
perlPackages.DBI
|
|
|
|
perlPackages.DBDSQLite
|
|
|
|
]
|
|
|
|
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
|
|
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
# Nixpkgs' Meson hook likes to set this to "plain".
|
|
|
|
mesonBuildType = "debugoptimized";
|
2024-04-01 20:06:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
enableParallelBuilding = true;
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-04-04 23:07:44 +00:00
|
|
|
postUnpack = "sourceRoot=$sourceRoot/perl";
|
|
|
|
}
|
|
|
|
)
|