[Nix-dev] [PATCH] t/allow-arbitrary-strinsg-in-names
Marc Weber
marco-oweber at gmx.de
Tue Jul 13 14:10:48 CEST 2010
Excerpts from Eelco Dolstra's message of Tue Jul 13 10:32:41 +0200 2010:
> Hi,
>
> On 07/13/2010 12:58 AM, Marc Weber wrote:
>
> > allow strings as names in attribute sets:
>
> For consistency, shouldn't they also be allowed in attribute selection? I.e.,
>
> as."git-1.8"
>
Sorry for posting a wrong example. The test case was correct
The overhead using getAttr is not as big as using listToAttrs. I mostly
thought of imitating switch/case like statements using attribute sets in Nix..
let sources = {
"1" = fetchurl
"2" = fetchurl
}; in
stdenv.mkDerivation {
name = "xxxx";
src = stdenv.lib.maybeAttr version (throw "no source given") sources;
}
I'm fine with posting a second patch allowing as."git-1.8"
Eelco Dolstra, can you also comment the dynamic_cast usage?
Another type could be added which is passed from the lexer to the
parser. Then it would not be necessary. static_cast would be an option
because changes are likely to be cought by the test suite..
Marc Weber
More information about the nix-dev
mailing list