mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
This includes the logic that disables checks on cross appropriately. Co-authored-by: Peder Bergebakken Sundt <pbsds@hotmail.com>
82 lines
1.5 KiB
Nix
82 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
mkMesonDerivation,
|
|
pkg-config,
|
|
perl,
|
|
perlPackages,
|
|
nix-store,
|
|
version,
|
|
curl,
|
|
bzip2,
|
|
libsodium,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) fileset;
|
|
in
|
|
|
|
perl.pkgs.toPerlModule (
|
|
mkMesonDerivation (finalAttrs: {
|
|
pname = "nix-perl";
|
|
inherit version;
|
|
|
|
workDir = ./.;
|
|
fileset = fileset.unions (
|
|
[
|
|
./.version
|
|
../../.version
|
|
./MANIFEST
|
|
./lib
|
|
./meson.build
|
|
./meson.options
|
|
]
|
|
++ lib.optionals finalAttrs.finalPackage.doCheck [
|
|
./.yath.rc.in
|
|
./t
|
|
]
|
|
);
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
perl
|
|
curl
|
|
];
|
|
|
|
buildInputs = [
|
|
nix-store
|
|
] ++ finalAttrs.passthru.externalBuildInputs;
|
|
|
|
# Hack for sake of the dev shell
|
|
passthru.externalBuildInputs = [
|
|
bzip2
|
|
libsodium
|
|
];
|
|
|
|
# `perlPackages.Test2Harness` is marked broken for Darwin
|
|
doCheck = !stdenv.isDarwin;
|
|
|
|
nativeCheckInputs = [
|
|
perlPackages.Test2Harness
|
|
];
|
|
|
|
preConfigure =
|
|
# "Inline" .version so its not a symlink, and includes the suffix
|
|
''
|
|
chmod u+w .version
|
|
echo ${finalAttrs.version} > .version
|
|
'';
|
|
|
|
mesonFlags = [
|
|
(lib.mesonOption "dbi_path" "${perlPackages.DBI}/${perl.libPrefix}")
|
|
(lib.mesonOption "dbd_sqlite_path" "${perlPackages.DBDSQLite}/${perl.libPrefix}")
|
|
(lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
|
|
];
|
|
|
|
mesonCheckFlags = [
|
|
"--print-errorlogs"
|
|
];
|
|
|
|
strictDeps = false;
|
|
})
|
|
)
|