Skip to content

WIP: Factoring out unfree non-redistributable vs. unfree redistributale licenses - #47237

Closed
bhipple wants to merge 1 commit into
NixOS:masterfrom
bhipple:u/license-redistribute
Closed

bhipple wants to merge 1 commit into
NixOS:masterfrom
bhipple:u/license-redistribute

Conversation

@bhipple

@bhipple bhipple commented Sep 23, 2018

Copy link
Copy Markdown
Contributor

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

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
# 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; }; }

Copy link
Copy Markdown
Contributor Author

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.

@bhipple

bhipple commented Sep 23, 2018

Copy link
Copy Markdown
Contributor Author

CC @xeji @orivej

Comment thread lib/licenses.nix
url = https://software.intel.com/en-us/license/intel-simplified-software-license;
free = false;
redistributable = true;
};

Copy link
Copy Markdown
Contributor Author

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;
}; }

Copy link
Copy Markdown
Contributor Author

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.

@GrahamcOfBorg GrahamcOfBorg added 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 Sep 23, 2018
@bhipple bhipple mentioned this pull request Sep 23, 2018
6 of 9 tasks
@bhipple bhipple closed this Oct 12, 2018
@infinisil

Copy link
Copy Markdown
Member

Nice! Any reason you closed this? This seems like a very sensible thing to do

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

Labels

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.

3 participants