From b78025586b5b28043c8db40b9ed250b245edc2d6 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 23 Jan 2018 15:42:02 -0600 Subject: [PATCH] busybox: don't use utmp/wtmp on musl since they won't work anyway https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs? --- pkgs/os-specific/linux/busybox/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index a8d5ab48ac21..e35c50450539 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -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 { @@ -69,6 +75,7 @@ stdenv.mkDerivation rec { ${extraConfig} CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}" + ${libcConfig} EOF make oldconfig