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
WIP: Factoring out unfree non-redistributable vs. unfree redistributale licenses #47237
Conversation
Currently, we have a catch-all `unfreeRedistributable` license that is intended to allow Hydra to build these packages; however, there are two issues: 1. It's not currently working (check any unfreeRedistributable package and you will not see it on Hydra's jobset). For example, a search for aliza [1] on hydra [2] comes up empty. 2. It obscures the actual license in question for a package. [1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/medicine/aliza/default.nix [2] https://hydra.nixos.org/jobset/nixpkgs/trunk#tabs-jobs
@@ -15,8 +15,14 @@ | |||
, limitedSupportedSystems ? [ "i686-linux" ] | |||
# Strip most of attributes when evaluating to spare memory usage | |||
, scrubJobs ? true | |||
# Attributes passed to nixpkgs. Don't build packages marked as unfree. | |||
, nixpkgsArgs ? { config = { allowUnfree = false; inHydra = true; }; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in the commit, I'm pretty sure Hydra is not currently working as intended, since it just says allowUnfree = false
and the unfree detection does not distinguish between unfreeRedistributable and a generic unfree license.
url = https://software.intel.com/en-us/license/intel-simplified-software-license; | ||
free = false; | ||
redistributable = true; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example of attaching the correct metadata to the actual license.
allowUnfree = false; | ||
allowUnfreePredicate = (p: p.meta.license.redistributable or false); | ||
inHydra = true; | ||
}; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add an attribute that can go into the config called allowUnfreeRedistributable
, that gets checked before the more generic allowUnfree
in the evaluator:
https://github.com/NixOS/nixpkgs/blob/18.03/pkgs/stdenv/generic/check-meta.nix#L184-L185
and has a nice warning message letting you know that you could get the pkg either by setting allowUnfree = true
or allowUnfreeRedistributable = true
in your config
. I'm not entirely sure if this is the way we want to go, since at an end-user level there's not a huge difference (it's more of a Hydra/distribution distinction), and the meta evaluator is already quite complex and heavy -- so I figured I'd open a WIP PR to see if anyone else has thoughts.
Nice! Any reason you closed this? This seems like a very sensible thing to do |
Currently, we have a catch-all
unfreeRedistributable
license that is intendedto allow Hydra to build these packages; however, there are two issues:
It's not currently working (check any unfreeRedistributable package and you
will not see it on Hydra's jobset). For example, a search for aliza [1] on hydra [2]
comes up empty.
It obscures the actual license in question for a package.
[1] https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/science/medicine/aliza/default.nix
[2] https://hydra.nixos.org/jobset/nixpkgs/trunk#tabs-jobs