mirror of
https://code.tvl.fyi/depot.git:/tools/nixery.git
synced 2024-10-23 12:53:04 +00:00
14 lines
356 B
Plaintext
14 lines
356 B
Plaintext
|
#!/bin/bash
|
||
|
set -ueo pipefail
|
||
|
|
||
|
function graphsFor() {
|
||
|
local pkg="${1}"
|
||
|
local graphs=$(nix-build --timeout 2 --argstr target "${pkg}" popcount.nix || echo -n 'empty.json')
|
||
|
cat $graphs | jq -r -cM '.[] | .references[]'
|
||
|
}
|
||
|
|
||
|
for pkg in $(cat all-top-level.json | jq -r '.[]'); do
|
||
|
graphsFor "${pkg}" 2>/dev/null
|
||
|
echo "Printed refs for ${pkg}" >&2
|
||
|
done
|