Skip to content

check-meta.nix: implement config.permittedUnfreePackages#44518

Closed
oxij wants to merge 2 commits intoNixOS:masterfrom
oxij:stdenv/permitted-unfree-packages
Closed

check-meta.nix: implement config.permittedUnfreePackages#44518
oxij wants to merge 2 commits intoNixOS:masterfrom
oxij:stdenv/permitted-unfree-packages

Conversation

@oxij
Copy link
Member

@oxij oxij commented Aug 5, 2018

I don't want to have allowUnfree = true set and risk accidentally adding something I didn't intend just because I need a single unfree package. On master you can whitelist a single vulnerable package, but you can only whitelist unfree ones together in a single swoop, this fixes it and generalizes docstring generation somewhat.

I think broken and unsupported packages should be done the same way, but that's not my itch ATM.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Aug 5, 2018
@matthewbauer
Copy link
Member

You can do this via allowUnfreePredicate right now:

let permittedUnfreePackages = [ ... ];
in {
  allowUnfreePredicate = pkg: builtins.elem pkg permittedUnfreePackages;
}

I dunno if it's worth doing here. I guess for consistency with insecure packages it does make sense.

I also still have open #43672 to try to standardize these config options a bit. I still haven't figured out how to fix the eval error yet though.

@oxij
Copy link
Member Author

oxij commented Aug 6, 2018

@matthewbauer Yes, in fact it does exactly that behind the scenes. But, IMHO, exposing a predicate to normal users is meh. "Set config.whatever to a function satisfying such and such properties" is meh remediation recipe compared to "Add this value to that list".

@edolstra
Copy link
Member

edolstra commented Aug 6, 2018

IMHO check-meta.nix is already over-engineered enough, so let's not make it even more complicated.

Also, permitted -> allowed for consistency.

@oxij
Copy link
Member Author

oxij commented Aug 6, 2018 via email

@oxij oxij force-pushed the stdenv/permitted-unfree-packages branch from 72ce706 to 5b4134a Compare August 6, 2018 19:15
@oxij
Copy link
Member Author

oxij commented Aug 8, 2018 via email

@oxij
Copy link
Member Author

oxij commented Aug 9, 2018

I have some more ideas about this, will redo later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: stdenv Standard environment 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants