Merge pull request #74363 from flokli/builduboot-src

buildUBoot: allow passing custom src
This commit is contained in:
Samuel Dionne-Riel 2019-11-27 16:10:01 -05:00 committed by GitHub
commit 0ee0489d42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 {