busybox: add enableAppletSymlinks?true

This commit adds an argument enableAppletSymlinks?true, which can be
set to false in order to turn off CONFIG_INSTALL_APPLET_SYMLINKS by
users if they only want the main busybox binary in their profile.
This is particularly useful when building pkgsStatic.busybox.
This commit is contained in:
Adam Joseph 2022-02-19 21:11:19 -08:00
parent 65c8149cb1
commit 78d815c5ef

View file

@ -1,6 +1,7 @@
{ stdenv, lib, buildPackages, fetchurl, fetchFromGitLab
, enableStatic ? stdenv.hostPlatform.isStatic
, enableMinimal ? false
, enableAppletSymlinks ? true
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
# nix build -f pkgs/top-level/release.nix stdenvBootstrapTools.x86_64-linux.dist
, useMusl ? stdenv.hostPlatform.libc == "musl", musl
@ -95,6 +96,11 @@ stdenv.mkDerivation rec {
CONFIG_STATIC y
''}
${lib.optionalString (!enableAppletSymlinks) ''
CONFIG_INSTALL_APPLET_DONT y
CONFIG_INSTALL_APPLET_SYMLINKS n
''}
# Use the external mount.cifs program.
CONFIG_FEATURE_MOUNT_CIFS n
CONFIG_FEATURE_MOUNT_HELPERS y