Created
April 5, 2018 16:12
-
-
Save Profpatsch/91b5a25d31764514485277f86b7ea862 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let | |
collectDeps = drv: | |
(lib.collect (v: (lib.isDerivation v && v != drv))) drv; | |
scrubDrv = f: drv: { | |
name = drv.name; | |
drv = drv; | |
deps = map f (collectDeps drv.drvAttrs); | |
meta = { | |
maintainers = drv.meta.maintainers or []; | |
}; | |
}; | |
scrub = lib.fix scrubDrv; | |
in { inherit collectDeps scrubDrv scrub; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/NixOS/nix/blob/master/corepkgs/derivation.nix is where
drvAttrs
comes from, btw.