depot/pkgs/build-support/references-by-popularity/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
401 B
Nix
Raw Normal View History

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