lix/perl/default.nix
Jade Lovelace 9c77c62e73 Move version to a JSON file so we can have release names
Change-Id: I5ff3396a302565ee5ee6c2db97e048e403779076
2024-06-06 15:08:12 -07:00

59 lines
973 B
Nix

{
lib,
fileset,
stdenv,
perl,
perlPackages,
pkg-config,
nix,
curl,
bzip2,
xz,
boost,
libsodium,
darwin,
meson,
ninja,
}:
perl.pkgs.toPerlModule (
stdenv.mkDerivation {
name = "nix-perl-${nix.version}";
src = fileset.toSource {
root = ../.;
fileset = fileset.unions ([
../version.json
./lib
./meson.build
]);
};
nativeBuildInputs = [
pkg-config
meson
ninja
];
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;
# Nixpkgs' Meson hook likes to set this to "plain".
mesonBuildType = "debugoptimized";
enableParallelBuilding = true;
postUnpack = "sourceRoot=$sourceRoot/perl";
}
)