diff options
author | Robert Hensing <robert@roberthensing.nl> | 2022-04-01 11:33:10 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2022-04-01 11:33:10 +0200 |
commit | 200175a7011c0602c0a8e6d4c6583d9d577a03d1 (patch) | |
tree | 15ca935a6c86f3628507c28aa07463284cc09b4c /pkgs/top-level/config.nix | |
parent | 3344cea254129714919142494ec3e9e75aa09891 (diff) |
config.allowAliases: Define as option
This simplifies usages and makes the default value consistent. In a few cases, the default value was interpreted to be `false`, but this is useless, because virtually nobody will explicitly set `allowAliases = true;`.
Diffstat (limited to 'pkgs/top-level/config.nix')
-rw-r--r-- | pkgs/top-level/config.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/top-level/config.nix b/pkgs/top-level/config.nix index 7a5b4bdd17989..948eb5ef9b72c 100644 --- a/pkgs/top-level/config.nix +++ b/pkgs/top-level/config.nix @@ -32,6 +32,24 @@ let feature = "run <literal>checkPhase</literal> by default"; }; + allowAliases = mkOption { + type = types.bool; + default = true; + description = '' + Whether to expose old attribute names for compatibility. + + The recommended setting is to enable this, as it + improves backward compatibity, easing updates. + + The only reason to disable aliases is for continuous + integration purposes. For instance, Nixpkgs should + not depend on aliases in its internal code. Projects + that aren't Nixpkgs should be cautious of instantly + removing all usages of aliases, as migrating too soon + can break compatibility with the stable Nixpkgs releases. + ''; + }; + }; in { |