[Nix-dev] Auto package updating script

Marc Weber marco-oweber at gmx.de
Thu Feb 10 00:17:26 CET 2011


Excerpts from Tobias Hunger's message of Wed Feb 09 23:51:43 +0100 2011:
> So what do you guys think?

We need such a tool. We already have two: the one written by Michael
Raskin and my nix-repository-manager

Raskins is writing configuration files (in .nix), evaluates them to get
an url and a regex from the result. The bash script then fetches the
site getting urls somehow and writes them to a .nix file which is
imported by the main default.nix file.

For my (and AFAIK also Eelcos) taste this requires too many small files.

My tool currently supports only VCS (git,mercurial,cvs,). In contrast to
fetchGit etc you can fetch incremental updates locally (my internet
connection is slow) creating snapshots.
I had in mind to make it accept input as used by Raskin.
My tool does not require any additional files. it adds region markes:

So it would look like this:

mkDerivation {
  # REGION FOO STATRT { url = "http://..../relases.html" # xpath="//get-verisons"; tags = [ tag1 tag2] }
    src = { ... };
    name = "...";
  # REGION FOO END

  ...
}

Then you can tag multiple packgaes by "gnome" or "xserver" and update
them all at once.

I agree that the markers are ugly - but they somehow manage to keep
everything in place.

uscan looks pretty. I think the greatest value is contained in those
control files. We should have a look at them and maybe we can share
work.

Moreover it supports git and more in  funny way:

  two examples from http://man.he.net/man1/uscan

  # qa.debian.org runs a redirector which allows a simpler form of URL
  # for SourceForge based projects. The format below will
  # automatically
  # be rewritten to use the redirector.
  http://sf.net/audacity/audacity-src-(.+)\.tar\.gz

  # githubredir.debian.net is a redirector
  # for GitHub projects
  # It can be used as following:
  http://githubredir.debian.net/github/<user>/<project>
  (.*).tar.gz

So probably we can learn from this project a lot.

Marc Weber



More information about the nix-dev mailing list