diff options
Diffstat (limited to 'nix/busybox.nix')
| -rw-r--r-- | nix/busybox.nix | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/nix/busybox.nix b/nix/busybox.nix index 7fbceda..04d1a36 100644 --- a/nix/busybox.nix +++ b/nix/busybox.nix @@ -1,22 +1,22 @@ -{ stdenv, fetchgit, linuxHeaders, buildPackages }: +{ stdenv, pkgsStatic }: stdenv.mkDerivation { name = "busybox-yerba"; - src = fetchgit { - url = "https://git.eaguru.guru/mirrors/busybox.git"; # change this to the official git.busybox.net/busybox when their SSL comes back - rev = "1_33_2"; - hash = "sha256-0/WbonvSRa57p6sEnY82h2u10WGJRb9IwFSTIJSyzlk="; - }; - buildInputs = [ linuxHeaders ]; - nativeBuildInputs = [ linuxHeaders ]; - preConfigure = '' - make defconfig - echo "CONFIG_STATIC=y" >> .config - ''; - buildPhase = '' - make -j$NIX_BUILD_CORES CROSS_COMPILE=${stdenv.cc.targetPrefix} HOSTCC=${buildPackages.stdenv.cc}/bin/gcc - ''; - installPhase = '' - make install CONFIG_PREFIX=$out/_install + buildCommand = '' + mkdir -p $out/_install/bin $out/_install/sbin + + cp ${pkgsStatic.busybox}/bin/busybox $out/_install/bin + chmod +x $out/_install/bin/busybox + + cd $out/_install/bin + for prog in $(./busybox --list); do + ln -s busybox $prog + done + + + cd $out/_install/sbin + for prog in $(./busybox --list); do + ln -s ../bin/busybox $prog + done ''; } |
