buildUBoot: allow passing custom src

We allowed passing another version, but that wasn't too useful, given we
hardcoded the hash of the fetchurl.
This commit is contained in:
Florian Klink 2019-11-27 21:21:24 +01:00
parent b345649811
commit cedbdc934d

View File

@ -4,7 +4,14 @@
}:
let
buildUBoot = { version ? "2019.10"
defaultVersion = "2019.10";
defaultSrc = fetchurl {
url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${defaultVersion}.tar.bz2";
sha256 = "053hcrwwlacqh2niisn0zas95zkbffw5aw5sdhixs8lmfdq60vcd";
};
buildUBoot = {
version ? null
, src ? null
, filesToInstall
, installDir ? "$out"
, defconfig
@ -12,16 +19,12 @@ let
, extraPatches ? []
, extraMakeFlags ? []
, extraMeta ? {}
, ... } @ args:
stdenv.mkDerivation ({
, ... } @ args: stdenv.mkDerivation ({
pname = "uboot-${defconfig}";
inherit version;
src = fetchurl {
url = "ftp://ftp.denx.de/pub/u-boot/u-boot-${version}.tar.bz2";
sha256 = "053hcrwwlacqh2niisn0zas95zkbffw5aw5sdhixs8lmfdq60vcd";
};
version = if src == null then defaultVersion else version;
src = if src == null then defaultSrc else src;
patches = [
(fetchpatch {