[Nix-dev] Re: nix-commits Digest, Vol 36, Issue 32 - Removed the "if version == ..." stuff

Michael Raskin 7c6f434c at mail.ru
Wed Jul 14 15:34:16 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/14/2010 04:50 PM, Eelco Dolstra wrote:
> Combining multiple versions also makes maintenance harder.  For instance, if I
> want to change something in the build process of 5.3.x, I have to think hard
> about what that will do to the 5.2.x case.  So you get code like this:
> 
>   cp php.ini-${ if builtins.lessThan (builtins.compareVersions version "5.3") 0
>     then "recommended" /* < PHP 5.3 */
>     else "production" /* >= PHP 5.3 */
>   }
> 
> I think it's much cleaner to have separate Nix expressions, e.g. php/5.2.nix and
> php/5.3.nix, and attributes php_5_2 and php_5_3 in all-packages.nix to refer to
> them.  They'll show up in "nix-env -qa" and you automatically get an error
> message if you refer to a removed version (e.g. php_5_1).

On the other hand, this way seems actually less vulnerable to
hard-to-find errors. Because unobvious fixes are shared by default.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMPbzXAAoJEE6tnN0aWvw3aHwIALJIKVodD5fYreoGKYOgbDi9
1xXFhNmb3tmp0BVpfc0kanc0GxyvSCcQwkwjtoW54eZ3oVKyfsN5iWcsadZy9HU+
5zg3ROH6MFS9jjIoBWhXozJ9CW7Nt8fYSToxGXxz+3Jbuo8sGpIVBd0LTqNY9AAf
rzBACG+rUUEolCzljqKUiUzdWlhtqyf1iOVS0pMnst4glbI3sgxocUxp3++2by6l
gJlsmTJ3ykQ+fbhWGGDRnuzd0rXkHZ/xc7PectmZ5XXPhNOUn2xcxrdlKTJkjvYT
dbeOBgf/Y3eh/vwfPc+aVFz+M6cn7KNqCStZRI8KU1cA2qBijasEbgUpy9s3PH0=
=83H6
-----END PGP SIGNATURE-----



More information about the nix-dev mailing list