Declare obsolete: hardware option; options with arguments.
svn path=/nixos/trunk/; revision=12552
This commit is contained in:
parent
51210b1904
commit
3fd58f8a03
@ -4,19 +4,30 @@ let
|
|||||||
inherit (pkgs.lib) mkOption;
|
inherit (pkgs.lib) mkOption;
|
||||||
inherit (builtins) head tail;
|
inherit (builtins) head tail;
|
||||||
|
|
||||||
|
obsolete = what: f: name:
|
||||||
|
if builtins ? trace then
|
||||||
|
builtins.trace "${name}: Obsolete ${what}." f name
|
||||||
|
else f name;
|
||||||
|
|
||||||
|
obsoleteMerge =
|
||||||
|
obsolete "option" pkgs.lib.mergeDefaultOption;
|
||||||
|
|
||||||
# temporary modifications.
|
# temporary modifications.
|
||||||
# backward here means that expression could either be a value or a
|
# backward here means that expression could either be a value or a
|
||||||
# function which expects to have a pkgs argument.
|
# function which expects to have a pkgs argument.
|
||||||
optionalPkgs = x:
|
optionalPkgs = name: x:
|
||||||
if __isFunction x then x pkgs else x;
|
if __isFunction x
|
||||||
|
then obsolete "notation" (name: x pkgs) name
|
||||||
|
else x;
|
||||||
|
|
||||||
backwardPkgsFunListMerge = name: list:
|
backwardPkgsFunListMerge = name: list:
|
||||||
pkgs.lib.concatMap optionalPkgs list;
|
pkgs.lib.concatMap (optionalPkgs name) list;
|
||||||
|
|
||||||
backwardPkgsFunMerge = name: list:
|
backwardPkgsFunMerge = name: list:
|
||||||
if list != [] && tail list == []
|
if list != [] && tail list == []
|
||||||
then optionalPkgs (head list)
|
then optionalPkgs name (head list)
|
||||||
else abort "${name}: Defined at least twice.";
|
else abort "${name}: Defined at least twice.";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -347,6 +358,7 @@ in
|
|||||||
|
|
||||||
enableGo7007 = mkOption {
|
enableGo7007 = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
merge = obsoleteMerge;
|
||||||
description = ''
|
description = ''
|
||||||
Enable this option to get support for the WIS GO7007SB
|
Enable this option to get support for the WIS GO7007SB
|
||||||
multi-format video encoder, which is used in a number of
|
multi-format video encoder, which is used in a number of
|
||||||
@ -431,6 +443,7 @@ in
|
|||||||
|
|
||||||
enableIntel2200BGFirmware = mkOption {
|
enableIntel2200BGFirmware = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
merge = obsoleteMerge;
|
||||||
description = "
|
description = "
|
||||||
Turn on this option if you want firmware for the Intel
|
Turn on this option if you want firmware for the Intel
|
||||||
PRO/Wireless 2200BG to be loaded automatically. This is
|
PRO/Wireless 2200BG to be loaded automatically. This is
|
||||||
@ -442,6 +455,7 @@ in
|
|||||||
|
|
||||||
enableIntel3945ABGFirmware = mkOption {
|
enableIntel3945ABGFirmware = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
merge = obsoleteMerge;
|
||||||
description = "
|
description = "
|
||||||
This option enables automatic loading of the firmware for the Intel
|
This option enables automatic loading of the firmware for the Intel
|
||||||
PRO/Wireless 3945ABG.
|
PRO/Wireless 3945ABG.
|
||||||
@ -450,6 +464,7 @@ in
|
|||||||
|
|
||||||
enableIntel4965AGNFirmware = mkOption {
|
enableIntel4965AGNFirmware = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
merge = obsoleteMerge;
|
||||||
description = "
|
description = "
|
||||||
This option enables automatic loading of the firmware for the Intel
|
This option enables automatic loading of the firmware for the Intel
|
||||||
PRO/Wireless 4965AGN.
|
PRO/Wireless 4965AGN.
|
||||||
@ -458,6 +473,7 @@ in
|
|||||||
|
|
||||||
enableZydasZD1211Firmware = mkOption {
|
enableZydasZD1211Firmware = mkOption {
|
||||||
default = false;
|
default = false;
|
||||||
|
merge = obsoleteMerge;
|
||||||
description = "
|
description = "
|
||||||
This option enables automatic loading of the firmware for the Zydas
|
This option enables automatic loading of the firmware for the Zydas
|
||||||
ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip.
|
ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user