[Nix-dev] environment.allowedLicenses ?

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Jan 26 14:00:10 CET 2015


Hi,

On 21/01/15 21:46, Matthias Beyer wrote:

> I just opened a PR for this:
> 
>     https://github.com/NixOS/nixpkgs/pull/5892
> 
> Please review calmly (I'm a nix-newbie) and tell me what to improve
> and what you think about it.

Hm, I have the impression the license checking code is becoming pretty heavy at
this point. For instance, what (realistically) is the use case for whitelisting?
Even a basic NixOS system configuration probably has dozens of (free) licenses,
and I can't imagine users going to the trouble of specifying them all. Also note
that all this license checking is on the mkDerivation critical path, so anything
we do there slows down "nix-env -qa".

I actually think we should *remove* meta.license entirely (because it doesn't
provide useful info to users and tends to be wrong or incomplete anyway), and
replace it with attributes that have operational meaning:

  * meta.unfree = <boolean>
  * meta.unfreeRedistributable = <boolean>
  * meta.unfreeRedistributableFirmware = <boolean>

and possibly meta.patentEncumbered or something like that, but that's a giant
can of worms that we probably don't want to open.

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list