1 #!/usr/bin/env nix-shell
2 #!nix-shell --pure -i bash -p nix cacert git getopt
4 # shellcheck shell=bash
7 echo "This script needs to be run from the root directory of nixpkgs. Exiting."
11 pkg_dir
="$(dirname "$0")"
13 src
="$(nix-build . --no-out-link -A coreboot-toolchain.i386.src)"
14 urls
=$
("${src}/util/crossgcc/buildgcc" -u)
17 echo '{ fetchurl }: [' >"$tmp"
20 name
="$(basename "$url")"
21 hash="$(nix-prefetch-url "$url")"
36 sed -ie 's/https\:\/\/ftpmirror\.gnu\.org/mirror\:\/\/gnu/g' "$tmp"
38 mv "$tmp" "${pkg_dir}/sources.nix"