Author: sandervanderburg
Date: Fri Dec 24 13:52:48 2010
New Revision: 25271
URL: https://svn.nixos.org/websvn/nix/?rev=25271&sc=1
Log:
Moved the selectPkgs function into the attributeset so that it can be used by
dydisnix as well
Modified:
disnix/disnix/trunk/data/lib.nix
Modified: disnix/disnix/trunk/data/lib.nix
==============================================================================
--- disnix/disnix/trunk/data/lib.nix Fri Dec 24 05:47:55 2010 (r25270)
+++ disnix/disnix/trunk/data/lib.nix Fri Dec 24 13:52:48 2010 (r25271)
@@ -10,7 +10,19 @@
pkgs_x86_64_freebsd = import nixpkgs { system = "x86_64-freebsd"; };
pkgs_i686_cygwin = import nixpkgs { system = "i686-cygwin"; };
- /* Determines the right pkgs collection from the system identifier */
+in
+rec {
+ inherit (builtins) attrNames getAttr listToAttrs head tail
unsafeDiscardOutputDependency;
+
+ /*
+ * Determines the right pkgs collection from the system identifier.
+ *
+ * Parameters:
+ * system: System identifier
+ *
+ * Returns:
+ * Packages collection for the given system identifier
+ */
selectPkgs = system:
if system == "i686-linux" then pkgs_i686_linux
@@ -21,9 +33,6 @@
else if system == "x86_64-freebsd" then pkgs_x86_64_freebsd
else if system == "i686-cygwin" then pkgs_i686_cygwin
else abort "unsupported system type: ${system}";
-in
-rec {
- inherit (builtins) attrNames getAttr listToAttrs head tail
unsafeDiscardOutputDependency;
/*
* Iterates over each service in the distribution attributeset, adds the
according service
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits