lib/modules: Change mkAliasOptionModule to use the priority for the alias.

This commit changes the `mkAliasOptionModule` function to make sure that
the priority for the aliased option is propagated to the non-aliased
option.

This also affects the `mkRenamedOptionModule` function in a similar
fashion.

This also removes the `mkAliasOptionModuleWithPriority` function, since
its functionality is now subsumed by `mkAliasOptionModule`.

This change was recommended by @nbp:
https://github.com/NixOS/nixpkgs/pull/53397#discussion_r245487432
This commit is contained in:
(cdep)illabout
2019-01-24 12:58:33 +09:00
parent 0abf181066
commit 81fa1e392b
5 changed files with 8 additions and 14 deletions

View File

@@ -32,7 +32,7 @@ with lib;
imports = [
# Create an alias for the "enable" option.
(mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ])
(mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
# Disable the aliased option, but with a default (low) priority so it
# should be able to be overridden by the next import.

View File

@@ -32,7 +32,7 @@ with lib;
imports = [
# Create an alias for the "enable" option.
(mkAliasOptionModuleWithPriority [ "enableAlias" ] [ "enable" ])
(mkAliasOptionModule [ "enableAlias" ] [ "enable" ])
# Disable the aliased option, but with a default (low) priority so it
# should be able to be overridden by the next import.