Skip to content

Instantly share code, notes, and snippets.

@fzakaria
Created January 6, 2022 03:25
Show Gist options
  • Save fzakaria/ae27a2ad58e1d80f5453b0ed0052297f to your computer and use it in GitHub Desktop.
Save fzakaria/ae27a2ad58e1d80f5453b0ed0052297f to your computer and use it in GitHub Desktop.
Compute output path of all attributes in nixpkgs
let
pkgs = import <nixpkgs> {
config.allowBroken = true;
config.allowUnfree = true;
};
lib = import <nixpkgs/lib>;
tryEval = builtins.tryEval;
in
lib.mapAttrs (k: v:
let name = (tryEval v.name or "");
out = (tryEval v.outPath or "");
in {
name = name.value;
out = out.value;
}
) pkgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment