summary refs log tree commit diff
path: root/pkgs/lib
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib')
-rw-r--r--pkgs/lib/licenses.nix16
-rw-r--r--pkgs/lib/options.nix13
2 files changed, 24 insertions, 5 deletions
diff --git a/pkgs/lib/licenses.nix b/pkgs/lib/licenses.nix
index fee430a40674..385993a320e4 100644
--- a/pkgs/lib/licenses.nix
+++ b/pkgs/lib/licenses.nix
@@ -4,6 +4,18 @@
    * add it to this list. The URL mentioned above is a good source for inspiration.
    */
 
+  agpl3 = {
+    shortName = "AGPLv3";
+    fullName = "GNU Affero General Public License version 3 only";
+    url = https://www.gnu.org/licenses/agpl.html;
+  };
+
+  agpl3Plus = {
+    shortName = "AGPLv3+";
+    fullName = "GNU Affero General Public License version 3 or later";
+    url = https://www.gnu.org/licenses/agpl.html;
+  };
+
   asl20 = {
     shortName = "ASL2.0";
     fullName = "Apache Software License 2.0";
@@ -19,13 +31,13 @@
   bsd2 = {
     shortName = "BSD-2";
     fullName = "BSD license (2 clause)";
-    url = http://www.freebsd.org/copyright/freebsd-license.html;
+    url = http://opensource.org/licenses/BSD-2-Clause;
   };
 
   bsd3 = {
     shortName = "BSD-3";
     fullName = "BSD license (3 clause)";
-    url = http://www.opensource.org/licenses/bsd-license.php;
+    url = http://opensource.org/licenses/BSD-3-Clause;
   };
 
   bsdOriginal = {
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix
index 59bda41a623f..4e9390470709 100644
--- a/pkgs/lib/options.nix
+++ b/pkgs/lib/options.nix
@@ -90,10 +90,17 @@ rec {
             # Evaluate sub-modules.
             subModuleMerge = path: vals:
               lib.fix (args:
-                let result = recurseInto path (optionConfig vals args); in {
-                  inherit (result) config options;
+                let
+                  result = recurseInto path (optionConfig vals args);
                   name = lib.removePrefix (opt.name + ".") path;
-                }
+                  extraArgs = opt.extraArgs or {};
+                  individualExtraArgs = opt.individualExtraArgs or {};
+                in {
+                  inherit (result) config options;
+                  inherit name;
+                } //
+                  (opt.extraArgs or {}) //
+                  (if hasAttr name individualExtraArgs then getAttr name individualExtraArgs else {})
               );
 
             # Add _options in sub-modules to make it viewable from other