2024-05-02 00:46:19 +00:00
|
|
|
{ runCommand, python3, coreutils }:
|
|
|
|
# Write the references of `path' to a file, in order of how "popular" each
|
|
|
|
# reference is. Nix 2 only.
|
2024-05-13 21:24:10 +00:00
|
|
|
path:
|
|
|
|
runCommand "closure-paths" {
|
2024-05-02 00:46:19 +00:00
|
|
|
exportReferencesGraph.graph = path;
|
|
|
|
__structuredAttrs = true;
|
|
|
|
preferLocalBuild = true;
|
|
|
|
nativeBuildInputs = [ coreutils python3 ];
|
2024-05-13 21:24:10 +00:00
|
|
|
} ''
|
2024-05-02 00:46:19 +00:00
|
|
|
python3 ${./closure-graph.py} "$NIX_ATTRS_JSON_FILE" graph > ''${outputs[out]}
|
|
|
|
''
|