[Nix-dev] Re: [Nix-commits] SVN commit: nix - 16859 - raskin - in nixpkgs/trunk/pkgs: build-support/builder-defs build-support/upstream-updater development/libraries development/libraries/geoip tools/admin tools/admin/webdruid top-level

Michael Raskin 7c6f434c at mail.ru
Wed Aug 26 16:49:25 CEST 2009


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

Eelco Dolstra wrote:
> I'm not convinced that this auto-updating is "worth it".  Having two extra Nix
> expressions for each package adds considerable clutter.  Writing

It will be reduced to one, for sure. I see at least one way, but it
locks the functionality into builderDefsPackage ecosystem..

> "src-info-for-default.nix" does not seem particularly easy.  It also seems

It is easy - for many packages only downloadPage and baseName is needed.
 The default regexps work fine; and I addressed Marc's point about
specialized snippets by creating snippets.sh (to define all the
snippets) and making sure you can use variable expansion.

> rather brittle (i.e. you download a page and scan for something that hopefully
> looks like the latest tarball with some regexps, if I understand it correctly -
> that's likely to break).

Actually, it is not. href="..."  is not a construct you normally see not
with a real url. And real URLs referring to source usually have .tar. or
.zip (the latter - in the end), so they are also not hard to
distinguish. If the page has unique style, regexp for choosing among
URLs may be changed.

> When you update to a new version, it is often necessary to update other parts of
> the Nix expression as well; in any case you have to test it.  So updating the

Actually - changes are needed not that often... Testing is frequently
done in a zero-extra-effort way (i.e. I planned to use this program
anyway, I just have to use a fresh version).

> name and hash attributes is only a small part of the effort anyway.

But the easiest to mess up. This script ensures that name and src are in
sync..

> Auto-updating is worth it when you have a large set of packages that all come
> from the same source and for which the pertinent package info can be obtained
> automatically, e.g., X.org releases, Hackage, CPAN, etc.

Well, I'd estimate that effort on adding auto-update markup to a package
is comparable with the edits for updating it two times..

> BTW, it seems that a lot of auto-update checking can be done globally.  For
> instance, you can just scan Nixpkgs for any fetchurl call with a
> mirror://sourceforge/<projectname>/<package>.tar... URL and see if Sourceforge
> has a newer version of <package>.  No need to specify a
> "src-info-for-default.nix" for each package.

Well, you can generate src-info-for-default.nix from sourceforge project
and package. It is just a bit more generic..
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJKlUt0AAoJEE6tnN0aWvw323EH/juJdO5XREBX6IPBEX/VwLku
PoaUNWCA0tWl7HrazCrUXs1/Oq9DwLk6budAHxHG4t4fdJY/hridtUpqY5OY71Du
U7zCNmRgQ6xP6GUskqsFVCT9wTx837vYKyO+qkg51LVSf5Q2t3KsZJN1EaHsImtW
2O9VbGSS2X5838oujwpWGzfwjcFVA8/baEpZGhe5q7I80GXK07Dj/JR55Lt11z0X
rl1l1nOIwFN5UdaQiXEYEgTYjqa8Z3kbPG9+NStP+QCUCcNh8Xkq2J9Mi+pWm9zY
w1Z+KQPEk6tbInly1TGrn0BSxU/RRjtLIG52jnMfHQZigj+5Yd//do2RoA8TymI=
=wwwS
-----END PGP SIGNATURE-----



More information about the nix-dev mailing list