uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,39 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p bash
CWD=$PWD
chko() {
(
T=`mktemp -d`
trap "rm -rf $T" EXIT INT PIPE
cd $T
cat >check.nix <<EOF
with import <nixpkgs> {};
fetchgit `cat $CWD/../mkderivation/src-main.nix`
EOF
nix-build check.nix
cat result/libraries/Makefile.libs
)
}
getsha256() {
URL=$(echo "$1" | sed 's/^"\(.*\)"$/\1/')
REV=$(echo "$2" | sed 's/^"\(.*\)"$/\1/')
SHA=$(nix run nixpkgs.nix-prefetch-git -c nix-prefetch-git --fetch-submodules "$URL" "$REV" 2>/dev/null | sed -n 's/.*"sha256": "\(.*\)",/\1/g p')
echo "{ url = $1; rev = $2; sha256 = \"$SHA\"; fetchSubmodules = true; }"
}
OUT=src-libs.nix
echo '[' > $OUT
chko |
grep checkout-git.sh |
tr \' \" |
while read NM TGT URL BR REV ; do
echo Trying $TGT $URL $REV >&2
getsha256 $URL $REV >> $OUT || exit 1
done
echo ']' >> $OUT