From 33e549fa4f032feb66e73ddb2b83ff60f4c27ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 9 Mar 2010 22:44:45 +0000 Subject: [PATCH] Adding a busybox option to build it statically. Adding it to the cross builds. svn path=/nixpkgs/trunk/; revision=20516 --- pkgs/misc/busybox/default.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 3 ++- pkgs/top-level/release-cross.nix | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/misc/busybox/default.nix b/pkgs/misc/busybox/default.nix index 61de814ad746..26d2e050fb75 100644 --- a/pkgs/misc/busybox/default.nix +++ b/pkgs/misc/busybox/default.nix @@ -1,11 +1,14 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, enableStatic ? false}: let basicConfigure = '' make defconfig sed -i 's,.*CONFIG_PREFIX.*,CONFIG_PREFIX="'$out'",' .config sed -i 's,.*CONFIG_INSTALL_NO_USR.*,CONFIG_INSTALL_NO_USR=y,' .config - ''; + '' + + (if enableStatic then '' + sed -i 's,.*CONFIG_STATIC.*,CONFIG_STATIC=y,' .config + '' else ""); in diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c6333cc0e914..213c4d4e765e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8915,8 +8915,9 @@ let inherit stdenv fetchurl emacs texLive; }; - busybox = import ../misc/busybox { + busybox = makeOverridable (import ../misc/busybox) { inherit fetchurl stdenv; + enableStatic = true; }; cups = import ../misc/cups { diff --git a/pkgs/top-level/release-cross.nix b/pkgs/top-level/release-cross.nix index fdac71e2da3e..695ee1c38e6b 100644 --- a/pkgs/top-level/release-cross.nix +++ b/pkgs/top-level/release-cross.nix @@ -5,6 +5,7 @@ let /* Basic list of packages to cross-build */ basicHostDrv = { bison.hostDrv = nativePlatforms; + busybox.hostDrv = nativePlatforms; tightvnc.hostDrv = nativePlatforms; #openoffice.hostDrv = nativePlatforms; wxGTK.hostDrv = nativePlatforms;