3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #34207 from dtzWill/fix/busybox-misc

busybox: bump copybuf, disable utmp/wtmp when not supported (musl)
This commit is contained in:
Jörg Thalheim 2018-02-10 13:38:43 +00:00 committed by GitHub
commit c69686e645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,13 @@
{ stdenv, lib, buildPackages, fetchurl, fetchpatch
, enableStatic ? false
, enableMinimal ? false
, useMusl ? false, musl
, useMusl ? stdenv.hostPlatform.libc == "musl", musl
, extraConfig ? ""
, buildPlatform, hostPlatform
}:
assert stdenv.hostPlatform.libc == "musl" -> useMusl;
let
configParser = ''
function parseconfig {
@ -24,6 +26,10 @@ let
}
'';
libcConfig = lib.optionalString useMusl ''
CONFIG_FEATURE_UTMP n
CONFIG_FEATURE_WTMP n
'';
in
stdenv.mkDerivation rec {
@ -67,8 +73,12 @@ stdenv.mkDerivation rec {
# Set paths for console fonts.
CONFIG_DEFAULT_SETFONT_DIR "/etc/kbd"
# Bump from 4KB, much faster I/O
CONFIG_FEATURE_COPYBUF_KB 64
${extraConfig}
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}"
${libcConfig}
EOF
make oldconfig