summary refs log tree commit diff
path: root/pkgs/os-specific/linux/busybox
diff options
context:
space:
mode:
authorWill Dietz <w@wdtz.org>2018-01-23 15:42:02 -0600
committerWill Dietz <w@wdtz.org>2018-02-01 08:51:21 -0600
commitb78025586b5b28043c8db40b9ed250b245edc2d6 (patch)
tree8af52be477d5402389875c2e826fa0713a5c0522 /pkgs/os-specific/linux/busybox
parent2fb4606f38deefa76da5d853645739f2faa315de (diff)
downloadnixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar.gz
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar.bz2
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar.lz
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar.xz
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.tar.zst
nixlib-b78025586b5b28043c8db40b9ed250b245edc2d6.zip
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?
Diffstat (limited to 'pkgs/os-specific/linux/busybox')
-rw-r--r--pkgs/os-specific/linux/busybox/default.nix9
1 files changed, 8 insertions, 1 deletions
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