joypixels: Switch from override to config option

Switch from an overridden variable to an option specified in
configuration.nix or config.nix:
  ```
  joypixels.acceptLicense = true;
  ```
This commit is contained in:
toonn 2020-08-08 21:15:08 +02:00 committed by Jan Tojnar
parent a880ab2e98
commit 25ca62c2a2
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,4 +1,6 @@
{ stdenv, fetchurl, acceptLicense ? false }:
{ stdenv, fetchurl, config
, acceptLicense ? config.joypixels.acceptLicense or false
}:
let inherit (stdenv.hostPlatform) system;
@ -40,8 +42,9 @@ assert !acceptLicense -> throw ''
- ${joypixels-free-license.fullName} [1]
- ${joypixels-license-appendix.fullName} [2]
You can express acceptance by overriding acceptLicense:
(joypixels.override { acceptLicense = true; })
You can express acceptance by setting acceptLicense to true in your
configuration (configuration.nix or config.nix):
joypixels.acceptLicense = true;
[1]: ${joypixels-free-license.url}
[2]: ${joypixels-license-appendix.url}