busybox: Use git to fetch debian.script from debian

Debian has yanked the upstream tarball we use to get default.script. We
could simply bump the version number to get the new tarball, but to
avoid the problem in the future, we should instead fetch it from git.
This commit is contained in:
Tethys Svensson 2020-09-13 11:30:39 +02:00
parent 43cd431b44
commit a9597f9573

View File

@ -1,4 +1,4 @@
{ stdenv, lib, buildPackages, fetchurl, fetchzip
{ stdenv, lib, buildPackages, fetchurl, fetchFromGitLab
, enableStatic ? false
, enableMinimal ? false
# Allow forcing musl without switching stdenv itself, e.g. for our bootstrapping:
@ -32,12 +32,18 @@ let
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";
# The debian version lacks behind the upstream version and also contains
# a debian-specific suffix. We only fetch the debian repository to get the
# default.script
debianVersion = "1.30.1-6";
debianSource = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "installer-team";
repo = "busybox";
rev = "debian/1%${debianVersion}";
sha256 = "sha256-6r0RXtmqGXtJbvLSD1Ma1xpqR8oXL2bBKaUE/cSENL8=";
};
debianDispatcherScript = "${debianTarball}/tree/udhcpc/etc/udhcpc/default.script";
debianDispatcherScript = "${debianSource}/debian/tree/udhcpc/etc/udhcpc/default.script";
outDispatchPath = "$out/default.script";
in