Created
January 6, 2022 03:25
-
-
Save fzakaria/ae27a2ad58e1d80f5453b0ed0052297f to your computer and use it in GitHub Desktop.
Compute output path of all attributes in nixpkgs
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
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