meson: fix cross compilation of systemd

Co-authored-by: Robin Gloster <mail@glob.in>
This commit is contained in:
volth 2018-10-12 00:03:46 +00:00 committed by John Ericson
parent 8d99a3455b
commit 9e1b883144

View File

@ -1,4 +1,4 @@
{ lib, python3Packages, stdenv, writeTextDir, substituteAll }: { lib, python3Packages, stdenv, writeTextDir, substituteAll, targetPackages }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
version = "0.46.1"; version = "0.46.1";
@ -47,20 +47,20 @@ python3Packages.buildPythonApplication rec {
crossFile = writeTextDir "cross-file.conf" '' crossFile = writeTextDir "cross-file.conf" ''
[binaries] [binaries]
c = '${stdenv.cc.targetPrefix}cc' c = '${targetPackages.stdenv.cc.targetPrefix}cc'
cpp = '${stdenv.cc.targetPrefix}c++' cpp = '${targetPackages.stdenv.cc.targetPrefix}c++'
ar = '${stdenv.cc.bintools.targetPrefix}ar' ar = '${targetPackages.stdenv.cc.bintools.targetPrefix}ar'
strip = '${stdenv.cc.bintools.targetPrefix}strip' strip = '${targetPackages.stdenv.cc.bintools.targetPrefix}strip'
pkgconfig = 'pkg-config' pkgconfig = 'pkg-config'
[properties] [properties]
needs_exe_wrapper = true needs_exe_wrapper = true
[host_machine] [host_machine]
system = '${stdenv.targetPlatform.parsed.kernel.name}' system = '${targetPackages.stdenv.targetPlatform.parsed.kernel.name}'
cpu_family = '${stdenv.targetPlatform.parsed.cpu.family}' cpu_family = '${targetPackages.stdenv.targetPlatform.parsed.cpu.family}'
cpu = '${stdenv.targetPlatform.parsed.cpu.name}' cpu = '${targetPackages.stdenv.targetPlatform.parsed.cpu.name}'
endian = ${if stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"} endian = ${if targetPackages.stdenv.targetPlatform.isLittleEndian then "'little'" else "'big'"}
''; '';
# 0.45 update enabled tests but they are failing # 0.45 update enabled tests but they are failing
@ -70,7 +70,7 @@ python3Packages.buildPythonApplication rec {
inherit (stdenv) cc; inherit (stdenv) cc;
isCross = stdenv.buildPlatform != stdenv.hostPlatform; isCross = stdenv.targetPlatform != stdenv.hostPlatform;
meta = with lib; { meta = with lib; {
homepage = http://mesonbuild.com; homepage = http://mesonbuild.com;