#!/usr/bin/env bash set -eo pipefail packages=$(nix flake show --json --all-systems| \ jq -r '.packages["x86_64-linux"] | keys[] | ".#packages.x86_64-linux.\(.)"') while IFS= read -r line; do echo "building package $line" nix build -L "$line" echo "done building package $line" done <<< "$packages"