From 78d815c5efe419ffcfff754fa65b464decfef9b6 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sat, 19 Feb 2022 21:11:19 -0800 Subject: [PATCH] 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. --- pkgs/os-specific/linux/busybox/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index 9e21955808f8..7aaedb5b1acd 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -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