To keep backward compatibility and have a typing would require making
all options null by default, adding a defaultText containing the actual
value, write the default value logic based on `!= null` and replacing
the nulls laters. This pretty much defeats the point of having used
a submodule type.
The security.wrappers option is morally a set of submodules but it's
actually (un)typed as a generic attribute set. This is bad for several
reasons:
1. Some of the "submodule" option are not document;
2. the default values are not documented and are chosen based on
somewhat bizarre rules (issue #23217);
3. It's not possible to override an existing wrapper due to the
dumb types.attrs.merge strategy;
4. It's easy to make mistakes that will go unnoticed, which is
really bad given the sensitivity of this module (issue #47839).
This makes the option a proper set of submodule and add strict types and
descriptions to every sub-option. Considering it's not yet clear if the
way the default values are picked is intended, this reproduces the current
behavior, but it's now documented explicitly.
Fixes this failure: https://hydra.nixos.org/build/152776341
Unsure how this happened, but I verified the GPG signatures locally to
make sure the new hash is good.
Squashed commits:
- Give wrapped executable a nicer name
The filename of the wrapped binary is used to generate usage examples in
`--help`. The `wrapProgram` command renames the executable to a hidden
file and appends `-wrapped` this is then shown in the usage example:
```
Usage: .lnxrouter-wrapped <options>
```
- Using `makeWrapper` the executable can be moved to another directory but
can keep it's oroginal name.
- Replace alias with real package name
- Fix variable name
- Import `makeWrapper` directly instead of importing `pkgs`
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
- Move `let` to where it is actually used
- Do not set optional packages `null`
- Remove `name` property
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
- Quote url
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
- Remove additional link in long description
- Remove unnecessary comment
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
- Place optional packages below their respective `use*`
- Shorten description
See discussion:
https://github.com/NixOS/nixpkgs/pull/137133#discussion_r705230260
- FIX: Remove duplicate description
- Remove empty line
Co-authored-by: markuskowa <markus.kowalewski@gmail.com>
- Make packages section more compact
- Make wifi dependencies optional
- Add package without wifi dependencies
- Fix indentation
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
- Use `with lib` only where it is needed
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>