about summary refs log tree commit diff
path: root/pkgs/profpatsch/netencode
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2020-06-23 23:05:46 +0200
committeraszlig <aszlig@nix.build>2020-06-23 23:27:18 +0200
commit6314fe724c31c54bc53bf15ebcc9c2ce9769583c (patch)
treefb04447d9306680ec210e98211ee4e019a448b36 /pkgs/profpatsch/netencode
parente4860ac4b1787577ad5fece81169f8ca807e6cfa (diff)
sandbox: Use closureInfo for getting runtime deps
A while ago[1], @Profpatsch added this comment above the definition of
the $runtimeDeps variable:

  # Reads the dependency closures and does ? something? TODO: explain

I just recently (yesterday as of the date of this commit) found out
about that comment by accident.

While this should probably be better of as an issue instead, the comment
does have a point, since not everybody enjoys reading/writing sed
expressions.

In a nutshell, what the implementation actually does is parsing the
output of the files generated by exportReferencesGraph.

At the time of writing the implementation, we didn't have a JSON-based
interface in Nix for doing the same, nor did we have something like
pkgs.closureInfo. There was only a small Perl script[2], which did
something like this, but given that it can be easily done via sed, I
opted to instead use the latter.

Nevertheless however, using closureInfo is not only more concise in its
implementation, it also makes our implementation much more concise as
well and also obvious on what we're doing here.

[1]: 09dc1d8ad625b9a1d5b89593b184d316837ba1cc
[2]: https://github.com/NixOS/nixpkgs/blob/8747190024205a5a3534b4e9a18dbaf3f3ee7b39/pkgs/build-support/kernel/paths-from-graph.pl

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/profpatsch/netencode')
0 files changed, 0 insertions, 0 deletions