Skip to content

Instantly share code, notes, and snippets.

@Profpatsch
Created April 5, 2018 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Profpatsch/91b5a25d31764514485277f86b7ea862 to your computer and use it in GitHub Desktop.
Save Profpatsch/91b5a25d31764514485277f86b7ea862 to your computer and use it in GitHub Desktop.
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; }
@Ericson2314
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment