Closed GuillaumeDesforges closed 1 year ago
Note it still needs some work on the inputs (e.g. other inputs than buildInputs are missing)
@zz1874 thanks for the review
This PR only tackles the issue of missing derivations, not the overall schema change, so it was made off main
(https://github.com/tweag/nixpkgs-graph-explorer/blob/695d934922020e1f3ad02f5570eb603ff5fae249/core/extract_data/cli/nixpkgs-graph.nix)
Let's merge this and adapt the schema and ingestion from there.
Why do we need this PR?
Before this PR, the attribute sets collected by
collect
were only attribute sets that were accessible as top-level derivations, so all derivations that were not accessible as top level packages were missed.Indeed
collect
only returns in the output list objects that are recursively accessible in the input argument. However, given that, in the input argument ofcollect
, we map input derivations (e.g. build inputs) to string in therecurse
function, these were not collected.How does this PR fix it?
This PR postpones mapping input derivations to a string (their output path) after collection, so that derivation inputs are part of the output.