diff options
author | aszlig <aszlig@nix.build> | 2020-06-23 23:05:46 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2020-06-23 23:27:18 +0200 |
commit | 6314fe724c31c54bc53bf15ebcc9c2ce9769583c (patch) | |
tree | fb04447d9306680ec210e98211ee4e019a448b36 /pkgs/profpatsch/netencode/netencode.rs | |
parent | e4860ac4b1787577ad5fece81169f8ca807e6cfa (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/netencode.rs')
0 files changed, 0 insertions, 0 deletions