[Nix-dev] concatAttrs :: [attrSet] -> attrSet ?

Sergiu Ivanov sivanov at colimite.fr
Sun May 28 17:23:07 CEST 2017


Hey Leo,

Thus quoth  Leo Gaspard  at 13:05 on Sun, May 28 2017:
> On 05/28/2017 02:58 PM, Sergiu Ivanov wrote:
>> My use case is quite specific. I do this, approximately:
>>
>>   let func name = { "${name}" = something name; };
>>   in concatAttrs (map func [ "name1" "name2" ])
>
> If this is your use case, you could also be interested in `genAttrs`
> defined in `lib/attrsets.nix` ;)

Excellent!  Worked like a charm, thanks a lot!  (After I realised I had
to use it like pkgs.lib.genAttrs in my context :-) )

--
Sergiu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170528/84d86e0d/attachment.sig>


More information about the nix-dev mailing list