You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
691 B
34 lines
691 B
#!/usr/bin/env nix-shell
|
|
#!nix-shell --pure -i bash update-shell.nix
|
|
|
|
set -xe
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
export PATH="/nix/store/yhr5cl61hqqx12zgfq8i3pkg0diq9v5k-nix-update/bin:$PATH"
|
|
nix-update coreboot $@
|
|
|
|
src="$(nix-build --no-out-link -A coreboot.src)"
|
|
urls=$($src/util/crossgcc/buildgcc -u)
|
|
|
|
echo '{ fetchurl }: [' > pkgs/coreboot/.files.nix.tmp
|
|
|
|
for url in $urls
|
|
do
|
|
name="$(basename $url)"
|
|
hash="$(nix-prefetch-url "$url")"
|
|
|
|
cat << EOF >> pkgs/coreboot/.files.nix.tmp
|
|
{
|
|
name = "$name";
|
|
archive = fetchurl {
|
|
sha256 = "$hash";
|
|
url = "$url";
|
|
};
|
|
}
|
|
EOF
|
|
|
|
done
|
|
|
|
echo ']' >> pkgs/coreboot/.files.nix.tmp
|
|
mv pkgs/coreboot/.files.nix.tmp pkgs/coreboot/files.nix
|
|
|