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
nixos module for accepting licenses #9234
Conversation
A general module where nixpkgs related licenses can be accepted. The module also helps to documents the available options. For example, the "allowUnfree" nixpkgs option can now be accepted by the following configuration in the "nixos/configuration.nix". nixpkgs = { licenses = { allowUnfree = true; }; }; The module also fixes the issue of passing "allowUnfree=true" to the i686 package tree within x86_64 systems. NOTE: The module only affects the evaluation of the system wide configuration. User initiated "nix-env" commands are not in- fluenced. A future "nixuser" program will take care of that.
The "Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX" is the first example of a license that is managed by the new "nixos/modules/misc/licenses.nix" module. By default, the license is black-listed and it has to be accepted explicitly. For nixos system wide evaluations the following can be added to the nixos/configuration.nix file to accept the license: nixpkgs = { licenses = { oracleBinaryCodeLicenseForJava = "accept"; }; }; For user initiated evaluations by, e.g., "nix-env", for example the following line can be added to "~/.nixpkgs/config.nix" to clear all black-listed licenses: blacklistedLicenses = [];
The license of the oraclejdk{7,7psu,8} packages have been changed to the "Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX". The packages can now only be installed once the license is accepted, e.g., within the "nixos/modules/misc/licenses.nix" module. In return, the packages are downloaded automatically without user intervention.
Hm, I don't know. I don't really want us to start reproducing Nixpkgs config options in NixOS. I mean, you can already set
|
Please let me know what you think! The need to better document license related options like, e.g., "allowUnfree" has been mentioned in #4493. |
@@ -347,6 +347,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec { | |||
fullName = "OpenSSL License"; | |||
}; | |||
|
|||
oraclejavabcl = { | |||
fullName = "Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX"; | |||
url = "http://www.oracle.com/technetwork/java/javase/terms/license/index.html"; |
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.
Unfree licenses must have free = false
to prevent them from being accepted by default.
A naive, untested suggestion:
... or some mechanism outside of nixpkgs to override the |
@edolstra Hm, so what do you suggest, how should I expose, e.g., the oraclejavabcl to the user? Should I create an option in nixpkgs.config instead? Would that be better than going down the black-listing approach? @jcumming Thank you very much for your thoughts, but ideally I want to get a solution for oraclejdk that works within nixpkgs. But maybe an integrated override option is the way to go! |
Is this still being worked on? |
@joachifm I'm still interested in a solution, but it doesn't have a high priority for me at the moment. |
Closing for being very stale. |
A general module where nixpkgs related licenses can be accepted.
The module also helps to documents the available options.
For example, the "allowUnfree" nixpkgs option can now be accepted
by the following configuration in the "nixos/configuration.nix".
nixpkgs = {
licenses = {
allowUnfree = true;
};
};
The module also fixes the issue of passing "allowUnfree=true" to
the i686 package tree within x86_64 systems.
NOTE: The module only affects the evaluation of the system wide
configuration. User initiated "nix-env" commands are not in-
fluenced. A future "nixuser" program will take care of that.
As an example, the installation of oraclejdk is handled by the new
module.
The license of the oraclejdk{7,7psu,8} packages have been changed
to the "Oracle Binary Code License Agreement for the Java SE Platform
Products and JavaFX". The packages can now only be installed once the
license is accepted, e.g., within the "nixos/modules/misc/licenses.nix"
module.
To accept the license for nixos system wide evaluations, the following can
be added to the nixos/configuration.nix file:
nixpkgs = {
licenses = {
oracleBinaryCodeLicenseForJava = "accept";
};
};