Author: NicolasPierron
Date: Thu Oct 14 18:18:38 2010
New Revision: 24295
URL: https://svn.nixos.org/websvn/nix/?rev=24295&sc=1
Log:
Enables the following renaming A -> C & B -> C and A -> B & B -> C.
Modified:
nixos/trunk/modules/rename.nix
Modified: nixos/trunk/modules/rename.nix
==============================================================================
--- nixos/trunk/modules/rename.nix Thu Oct 14 16:49:41 2010 (r24294)
+++ nixos/trunk/modules/rename.nix Thu Oct 14 18:18:38 2010 (r24295)
@@ -27,7 +27,13 @@
zipModules = list: with pkgs.lib;
zip (n: v:
- if tail v != [] then zipModules v else head v
+ if tail v != [] then
+ if n == "_type" then builtins.trace "Merge _type" (head v)
+ else if n == "extraConfigs" then builtins.trace "Merge extraConfigs"
(concatLists v)
+ else if n == "description" || n == "apply" then
+ abort "Cannot rename an option to multiple options."
+ else zipModules v
+ else head v
) list;
rename = statusTemplate: from: to: with pkgs.lib;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits