We need capnproto-lix to be provided by callPackage, otherwise it won't be spliced and the same (built for the cross host platform) for both buildInputs (correct) and nativeBuildInputs (incorrect). We thus move it into the overlay. A similar problem exists for the lowdown build. We thus use callPackage to override it as well. This is horrible (especially because it means we need to pass the enableDarwinSandbox package argument through ourselves), but at least it builds... Fixes: https://git.lix.systems/lix-project/lix/issues/939 Change-Id: I802152072d852903401ef701f526195aa99475f2
63 lines
1.0 KiB
Nix
63 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
fileset,
|
|
stdenv,
|
|
perl,
|
|
perlPackages,
|
|
pkg-config,
|
|
nix,
|
|
curl,
|
|
bzip2,
|
|
xz,
|
|
boost,
|
|
libsodium,
|
|
darwin,
|
|
meson,
|
|
ninja,
|
|
capnproto,
|
|
}:
|
|
|
|
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
|
|
# for kj-async
|
|
capnproto
|
|
]
|
|
++ 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";
|
|
}
|
|
)
|