-
-
Save thefloweringash/ec9511da8c7f41f903eb530a68f7e30f to your computer and use it in GitHub Desktop.
Hacky bootstrap test script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
set -x | |
target="pkgs/stdenv/linux/bootstrap-files/armv7l.nix" | |
bootstrapToolsDist=$( | |
nix-build pkgs/top-level/release-cross.nix -A bootstrapTools.armv7l.dist | |
) | |
fetchOutput() { | |
local wanted="$1" | |
while read -r type name path; do | |
if [ "$name" == "$wanted" ]; then | |
echo "$path" | |
return 0 | |
fi | |
done < "$bootstrapToolsDist/nix-support/hydra-build-products" | |
return 1 | |
} | |
busybox=$(fetchOutput "busybox") | |
bootstrapTools=$(fetchOutput "tarball") | |
echo "{ | |
bootstrapTools = $bootstrapTools; | |
busybox = $busybox; | |
}" > $target | |
nix-build --argstr system armv7l-linux -A hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment