systemd: Fix cross build

This was very similar to the Mesa issues fixed in
62e6d73a09870174a891d2a8d29a38e62b05efd5: the user-written code is
looking up an unprefixed binutils program.

[I think we should have a way in Meson of specifying a program prefix in
the cross / native files, as a fallback for any program that isn't
explicitly specified. This could both be availible for user written
rules, and help with the default rules.]

Fixes https://github.com/NixOS/mobile-nixos/issues/161
wip/yesman
John Ericson 4 years ago
parent 87e86b4574
commit a239864fc6
  1. 7
      pkgs/os-specific/linux/systemd/default.nix

@ -66,6 +66,13 @@ in stdenv.mkDerivation {
postPatch = ''
substituteInPlace src/basic/path-util.h --replace "@defaultPathNormal@" "${placeholder "out"}/bin/"
substituteInPlace src/boot/efi/meson.build \
--replace \
"find_program('ld'" \
"find_program('${stdenv.cc.bintools.targetPrefix}ld'" \
--replace \
"find_program('objcopy'" \
"find_program('${stdenv.cc.bintools.targetPrefix}objcopy'"
'';
outputs = [ "out" "lib" "man" "dev" ];

Loading…
Cancel
Save