[Nix-dev] Auto package update script v3

Tobias Hunger tobias.hunger at gmx.de
Tue Feb 15 22:12:13 CET 2011


Hello!

Attached you will find the 3rd version of my auto package updating script.

The functionality is very similar to what I had in version 2 already. 
Improvements include:
* Making version replacements more robust: Version numbers are only
  replaced in the lines where they were found originally instead of globaly 
  in the file. This way the script can handle nix expressions like the one 
  in pkgs/server/x11/xorg with *lots* of expressions.

   The version information is extracted from the name attribute of a
   derivation. It is replaced in either
   1) any line containing an attribute of the derivation that contains the
      version information as a string only. This should cover most kinds of
      version attribute we have.
   2) the line containing the name attribute of the derivation.

* Replace urls (provided they do not contain any variable replacements
   already.

I am rather happy with the results so far. I have converted about 60 
derivations so far and most were really straight forward: All I needed to do 
was to add a watchfile attribute as well as the watchfile itself. These 
updates are included in the attached patch.

Comments?

Best Regards,
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pkgupdater.patch.bz2
Type: application/x-bzip
Size: 37764 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110215/c231c220/attachment.bin 


More information about the nix-dev mailing list