about summary refs log tree commit diff
path: root/pkgs/build-support/upstream-updater/attrset-to-dir.nix
blob: 006537278daefb4c03642cb58ab4a5afd792b4a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
a :
a.stdenv.mkDerivation {
  buildCommand = ''
    mkdir -p "$out/attributes"
  '' + (a.lib.concatStrings (map
    (n: ''
      ln -s "${a.writeTextFile {name=n; text=builtins.getAttr n a.theAttrSet;}}" $out/attributes/${n};
    '')
    (builtins.attrNames a.theAttrSet)
  ));

  name = "attribute-set";
  meta = {
    description = "Contents of an attribute set";
    maintainers = [
      a.lib.maintainers.raskin
    ];
  };
}