[Nix-dev] Nix expression writing conventions

Eelco Dolstra e.dolstra at tudelft.nl
Thu Jul 29 17:04:56 CEST 2010


Hi,

On 07/29/2010 04:52 PM, Sander van der Burg - EWI wrote:

> So what I noticed from all these expressions is that it is probably better/nicer
> to specify the name and the version number separately and use those attributes
> to form a name for in the Nix store and a download URL.
> Wouldn't it be better to specify expression by default, like this:
> 
> {stdenv, fetchurl, gettext}:
> 
> stdenv.mkDerivation rec {
>   name = "hello";
>   version = "1.0";

Yes, this is probably best, but we'll have to teach nix-env about the version
attribute.  A big advantage is that we get rid of the ambiguity between the name
part and the version part in names such "foo-cvs".

-- 
Eelco Dolstra | http://www.st.ewi.tudelft.nl/~dolstra/



More information about the nix-dev mailing list