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:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
23
pkgs/os-specific/linux/kernel/update-zen.sh
Executable file
23
pkgs/os-specific/linux/kernel/update-zen.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -I nixpkgs=../../../.. -i bash -p nix-prefetch git gnused gnugrep nix curl
|
||||
set -euo pipefail -x
|
||||
|
||||
nixpkgs="$(git rev-parse --show-toplevel)"
|
||||
old=$(nix-instantiate --eval -A linuxPackages_zen.kernel.modDirVersion "$nixpkgs")
|
||||
old="${old%\"}"
|
||||
old="${old#\"}"
|
||||
new=$(curl https://github.com/zen-kernel/zen-kernel/releases.atom | grep -m1 -o -E '[0-9.]+-zen[0-9]+')
|
||||
# add ".0" patch to modDirVersion when minor only
|
||||
new=$(echo "$new" | sed -E 's/^([0-9]+)\.([0-9]+)-(\w+)$/\1.\2.0-\3/')
|
||||
if [[ "$new" == "$old" ]]; then
|
||||
echo "already up-to-date"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
path="$nixpkgs/pkgs/os-specific/linux/kernel/linux-zen.nix"
|
||||
|
||||
sed -i -e "s!modDirVersion = \".*\"!modDirVersion = \"${new}\"!" "$path"
|
||||
checksum=$(nix-prefetch "(import ${nixpkgs} {}).linuxPackages_zen.kernel")
|
||||
sed -i -e "s!sha256 = \".*\"!sha256 = \"${checksum}\"!" "$path"
|
||||
|
||||
git commit -m "linuxKernel.kernels.linux_zen: ${old} -> ${new}" $path
|
||||
Loading…
Add table
Add a link
Reference in a new issue