[Nix-dev] atrr to string
Vladimír Čunát
vcunat at gmail.com
Mon Jun 1 08:21:54 CEST 2015
On 06/01/2015 04:02 AM, Arseniy Seroka wrote:
> Hello! How can I view attribute as a string?
> `toString` is not what I need.
> I need `getAttrAsString pkgs.firefox -> "firefox"`
See http://nixos.org/nix/manual/#ssec-builtins - there's
builtins.attrNames, for example, so
builtins.attrNames { inherit (pkgs) firefox; } == [ "firefox" ]
Vladimir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3251 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150601/2ab05003/attachment-0001.bin
More information about the nix-dev
mailing list