From 28740462e7c03b607e5ea06c3acf5a2da772fb01 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Tue, 19 Jul 2016 04:37:14 +0300 Subject: [PATCH] busybox: fix static build --- pkgs/os-specific/linux/busybox/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/busybox/default.nix b/pkgs/os-specific/linux/busybox/default.nix index b04f7855fefa..92f24b9e9ae2 100644 --- a/pkgs/os-specific/linux/busybox/default.nix +++ b/pkgs/os-specific/linux/busybox/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, musl +{ stdenv, lib, fetchurl, glibc, musl , enableStatic ? false , enableMinimal ? false , useMusl ? false @@ -48,7 +48,7 @@ stdenv.mkDerivation rec { CONFIG_LFS y - ${stdenv.lib.optionalString enableStatic '' + ${lib.optionalString enableStatic '' CONFIG_STATIC y ''} @@ -64,10 +64,12 @@ stdenv.mkDerivation rec { EOF make oldconfig - '' + stdenv.lib.optionalString useMusl '' + '' + lib.optionalString useMusl '' makeFlagsArray+=("CC=gcc -isystem ${musl}/include -B${musl}/lib -L${musl}/lib") ''; + buildInputs = lib.optionals (enableStatic && !useMusl) [ glibc glibc.static ]; + crossAttrs = { extraCrossConfig = '' CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cross.config}-"