3
0
Fork 0
forked from mirrors/nixpkgs

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

View file

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