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