2024-04-04 23:07:44 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fileset,
|
|
|
|
stdenv,
|
|
|
|
perl,
|
|
|
|
perlPackages,
|
|
|
|
pkg-config,
|
|
|
|
nix,
|
|
|
|
curl,
|
|
|
|
bzip2,
|
|
|
|
xz,
|
|
|
|
boost,
|
|
|
|
libsodium,
|
|
|
|
darwin,
|
|
|
|
meson,
|
|
|
|
ninja,
|
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 = ../.;
|
2024-05-07 19:34:36 +00:00
|
|
|
fileset = fileset.unions ([
|
|
|
|
../.version
|
|
|
|
./lib
|
|
|
|
./meson.build
|
|
|
|
]);
|
2024-04-04 23:07:44 +00:00
|
|
|
};
|
2024-03-04 03:37:44 +00:00
|
|
|
|
2024-05-07 19:34:36 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
)
|