New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong documentation for non-free packages #67830
Comments
Related to #55678. Maybe the docs are fixed in unstable.
It's not used always but probably in most packages now.
|
Notice that you shouldn't have to apply So, for the example from the documentation, this should suffice: {
allowUnfreePredicate = (pkg: builtins.elem
pkg.pname [
"flashplayer"
"vscode"
]);
} |
When you want to whitelist a mix of unfree packages by name, some of which use {
# ...
nixpkgs.config.allowUnfreePredicate = (pkg:
builtins.elem (pkg.pname or (builtins.parseDrvName pkg.name).name) [
"steam"
"steam-original"
"steam-runtime"
]
);
# ...
} Due to operator precedence, the parentheses can be dropped, but I find the resulting code harder to understand: {
# ...
nixpkgs.config.allowUnfreePredicate = (pkg:
builtins.elem pkg.pname or (builtins.parseDrvName pkg.name).name [
"steam"
"steam-original"
"steam-runtime"
]
);
# ...
} |
I wonder though: Is checking the names the right approach at all for whitelisting a known set of packages? Wouldn't it better refer to them by their attribute path, e.g. |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/question-regarding-configuration-nix/1619/22 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/question-regarding-configuration-nix/1619/23 |
I marked this as stale due to inactivity. → More info |
... |
Is this issue still a problem? Currently (and probably since 20.03, which included 9b090cc), https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree states:
This should work with packages that define Lines 475 to 490 in 747d5a3
|
I cant comment on this as I dont have Nix running anymore. |
Issue description
The documentation at https://nixos.org/nixpkgs/manual/ states:
Which will produce
Technical details
Is fixed when changing the docs to
I am not sure if it is always
pname
or just for VsCode. In addition to that I am not sure how to find the right place to change this. Is thedocs/configuration.xml
used for this or somehow autogenerated?The text was updated successfully, but these errors were encountered: