busybox: Optionally use uclibc

This commit is contained in:
Eelco Dolstra 2014-10-29 14:44:56 +01:00
parent c77b30e3fb
commit 41a479b15f
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, enableStatic ? false, enableMinimal ? false, extraConfig ? "" }:
{ lib, stdenv, uclibc, fetchurl, enableStatic ? false, enableMinimal ? false, useUclibc ? false, extraConfig ? "" }:
let
configParser = ''
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
CONFIG_PREFIX "$out"
CONFIG_INSTALL_NO_USR y
${stdenv.lib.optionalString enableStatic ''
${lib.optionalString enableStatic ''
CONFIG_STATIC y
''}
@ -54,6 +54,8 @@ stdenv.mkDerivation rec {
EOF
make oldconfig
'' + lib.optionalString useUclibc ''
makeFlagsArray+=("CC=gcc -isystem ${uclibc}/include -B${uclibc}/lib -L${uclibc}/lib")
'';
crossAttrs = {
@ -70,8 +72,8 @@ stdenv.mkDerivation rec {
meta = {
description = "Tiny versions of common UNIX utilities in a single small executable";
homepage = http://busybox.net/;
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.viric ];
platforms = lib.platforms.linux;
};
}

View File

@ -17,6 +17,7 @@ rec {
};
busyboxMinimal = busybox.override {
useUclibc = true;
enableStatic = true;
enableMinimal = true;
extraConfig = ''