-
-
Save grahamc/84e7d2aabbf346f3e7a5e56578c257ec to your computer and use it in GitHub Desktop.
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 nix-shell | |
#!nix-shell -i bash -p nix jq findutils coreutils --pure | |
LOGFILE=./reproducibility-log | |
( | |
# fairly safe... store paths won't have spaces | |
for drv in $(find /nix/store -maxdepth 1 -name '*.drv'); do | |
# nor will they have quotes v v | |
out=$(nix show-derivation "$drv" | jq -r '.["'"$drv"'"].outputs.out.path') | |
if [ ! -e "$out" ]; then | |
echo "out missing: $drv" >&2 | |
elif grep -q "$drv" "$LOGFILE"; then | |
echo "already checked: $drv" >&2 | |
elif nix-build "$drv" --check >&2; then | |
printf "reproducible\t%s\n" "$drv" | |
else | |
printf "irreproducible\t%s\n" "$drv" | |
fi | |
done | |
) | tee -a "$LOGFILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment