[Nix-dev] Attributes ‘baseName’, ‘baseVersion’, and ‘revision’

Ludovic Courtès ludo at gnu.org
Mon Nov 15 17:09:12 CET 2010


Hi Michael,

A question on the style:

Michael Raskin <7c6f434c at mail.ru> writes:

> --- nixpkgs/trunk/pkgs/development/compilers/vala/default.nix	Sun Nov 14 18:55:09 2010	(r24685)
> +++ nixpkgs/trunk/pkgs/development/compilers/vala/default.nix	Mon Nov 15 06:16:41 2010	(r24686)
> @@ -1,10 +1,14 @@
>  {stdenv, fetchurl, yacc, flex, pkgconfig, glib}:
>  
>  stdenv.mkDerivation rec {
> -  name = "vala-0.9.2";
> +  baseName = "vala";
> +  baseVersion = "0.11";
> +  revision = "2";
> +  version = "${baseVersion}.${revision}";
> +  name = "${baseName}-${version}";

Why about making ‘baseName’, ‘baseVersion’, and ‘revision’ local
variables instead of attributes, since they are not actually used by the
‘mkDerivation’ call?

They could be called just ‘name’ and ‘version’, too.

Are these attributes used by your auto-update tool?

Thanks,
Ludo’.



More information about the nix-dev mailing list