linuxHeaders: replace rsync by cp and find
See https://github.com/NixOS/nixpkgs/pull/78994#issuecomment-584437442
This commit is contained in:
parent
d48e99d912
commit
330707e54d
1 changed files with 10 additions and 6 deletions
|
@ -1,7 +1,4 @@
|
|||
{ stdenvNoCC, lib, buildPackages
|
||||
, fetchurl, perl, rsync
|
||||
, elf-header
|
||||
}:
|
||||
{ stdenvNoCC, lib, buildPackages, fetchurl, perl, elf-header }:
|
||||
|
||||
let
|
||||
makeLinuxHeaders = { src, version, patches ? [] }: stdenvNoCC.mkDerivation {
|
||||
|
@ -16,7 +13,7 @@ let
|
|||
# We do this so we have a build->build, not build->host, C compiler.
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
# `elf-header` is null when libc provides `elf.h`.
|
||||
nativeBuildInputs = [ perl rsync elf-header ];
|
||||
nativeBuildInputs = [ perl elf-header ];
|
||||
|
||||
extraIncludeDirs = lib.optional stdenvNoCC.hostPlatform.isPowerPC ["ppc"];
|
||||
|
||||
|
@ -47,8 +44,15 @@ let
|
|||
make headers_check $makeFlags
|
||||
'';
|
||||
|
||||
# The following command requires rsync:
|
||||
# make headers_install INSTALL_HDR_PATH=$out $makeFlags
|
||||
# but rsync depends on popt which does not compile on aarch64 without
|
||||
# updateAutotoolsGnuConfigScriptsHook which is not enabled in stage2,
|
||||
# so we replicate it with cp. This also reduces bootstrap closure size.
|
||||
installPhase = ''
|
||||
make headers_install INSTALL_HDR_PATH=$out $makeFlags
|
||||
mkdir -p $out
|
||||
cp -r usr/include $out
|
||||
find $out -type f ! -name '*.h' -delete
|
||||
''
|
||||
# Some builds (e.g. KVM) want a kernel.release.
|
||||
+ ''
|
||||
|
|
Loading…
Reference in a new issue