Merge pull request #92581 from TethysSvensson/busybox-udhcpc-script
This commit is contained in:
commit
b75f2114ea
@ -8022,6 +8022,12 @@
|
|||||||
githubId = 26417242;
|
githubId = 26417242;
|
||||||
name = "Mikolaj Galkowski";
|
name = "Mikolaj Galkowski";
|
||||||
};
|
};
|
||||||
|
TethysSvensson = {
|
||||||
|
email = "freaken@freaken.dk";
|
||||||
|
github = "TethysSvensson";
|
||||||
|
githubId = 4294434;
|
||||||
|
name = "Tethys Svensson";
|
||||||
|
};
|
||||||
teto = {
|
teto = {
|
||||||
email = "mcoudron@hotmail.com";
|
email = "mcoudron@hotmail.com";
|
||||||
github = "teto";
|
github = "teto";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, buildPackages, fetchurl
|
{ stdenv, lib, buildPackages, fetchurl, fetchzip
|
||||||
, enableStatic ? false
|
, enableStatic ? false
|
||||||
, enableMinimal ? false
|
, enableMinimal ? false
|
||||||
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
|
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
|
||||||
@ -31,6 +31,14 @@ let
|
|||||||
CONFIG_FEATURE_UTMP n
|
CONFIG_FEATURE_UTMP n
|
||||||
CONFIG_FEATURE_WTMP n
|
CONFIG_FEATURE_WTMP n
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
debianName = "busybox_1.30.1-5";
|
||||||
|
debianTarball = fetchzip {
|
||||||
|
url = "http://deb.debian.org/debian/pool/main/b/busybox/${debianName}.debian.tar.xz";
|
||||||
|
sha256 = "03m4rvs2pd0hj0mdkdm3r4m1gh0bgwr0cvnqds297xnkfi5s01nx";
|
||||||
|
};
|
||||||
|
debianDispatcherScript = "${debianTarball}/tree/udhcpc/etc/udhcpc/default.script";
|
||||||
|
outDispatchPath = "$out/default.script";
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -81,6 +89,9 @@ stdenv.mkDerivation rec {
|
|||||||
# Bump from 4KB, much faster I/O
|
# Bump from 4KB, much faster I/O
|
||||||
CONFIG_FEATURE_COPYBUF_KB 64
|
CONFIG_FEATURE_COPYBUF_KB 64
|
||||||
|
|
||||||
|
# Set the path for the udhcpc script
|
||||||
|
CONFIG_UDHCPC_DEFAULT_SCRIPT "${outDispatchPath}"
|
||||||
|
|
||||||
${extraConfig}
|
${extraConfig}
|
||||||
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}"
|
CONFIG_CROSS_COMPILER_PREFIX "${stdenv.cc.targetPrefix}"
|
||||||
${libcConfig}
|
${libcConfig}
|
||||||
@ -95,6 +106,15 @@ stdenv.mkDerivation rec {
|
|||||||
makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}cc -isystem ${musl.dev}/include -B${musl}/lib -L${musl}/lib")
|
makeFlagsArray+=("CC=${stdenv.cc.targetPrefix}cc -isystem ${musl.dev}/include -B${musl}/lib -L${musl}/lib")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
sed -e '
|
||||||
|
1 a busybox() { '$out'/bin/busybox "$@"; }\
|
||||||
|
logger() { '$out'/bin/logger "$@"; }\
|
||||||
|
' ${debianDispatcherScript} > ${outDispatchPath}
|
||||||
|
chmod 555 ${outDispatchPath}
|
||||||
|
PATH=$out/bin patchShebangs ${outDispatchPath}
|
||||||
|
'';
|
||||||
|
|
||||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||||
|
|
||||||
buildInputs = lib.optionals (enableStatic && !useMusl && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static ];
|
buildInputs = lib.optionals (enableStatic && !useMusl && stdenv.cc.libc ? static) [ stdenv.cc.libc stdenv.cc.libc.static ];
|
||||||
@ -107,7 +127,7 @@ stdenv.mkDerivation rec {
|
|||||||
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 = "https://busybox.net/";
|
homepage = "https://busybox.net/";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with maintainers; [ ];
|
maintainers = with maintainers; [ TethysSvensson ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
priority = 10;
|
priority = 10;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user