about summary refs log tree commit diff
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2024-04-22 13:16:01 +0200
committertoonn <toonn@toonn.io>2024-04-30 17:20:22 +0200
commit74e591dc460a04eea2e835ee2f3787cf19fa2222 (patch)
tree2f77526e08fc6b3b036136b684bed22cb793f491
parent09426fe8710936526444619b21dc349cb9efc917 (diff)
joypixels: Narrow unfree recommendation
JoyPixels requires explicit consent to the license and since the license
is unfree NixPkgs has to be configured to allow the package. This
updates the recommendation from setting allowUnfreePackages to adding
just JoyPixels to the allowUnfreePredicate.
-rw-r--r--pkgs/data/fonts/joypixels/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix
index 2d1296b8cf346..b54aaefa10c7c 100644
--- a/pkgs/data/fonts/joypixels/default.nix
+++ b/pkgs/data/fonts/joypixels/default.nix
@@ -43,11 +43,16 @@ let
     unfree licenses.
 
     configuration.nix:
-      nixpkgs.config.allowUnfree = true;
+      nixpkgs.config.allowUnfreePredicate = pkg:
+        builtins.elem (lib.getName pkg) [
+          "joypixels"
+        ];
       nixpkgs.config.joypixels.acceptLicense = true;
 
     config.nix:
-      allowUnfree = true;
+      allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
+        "joypixels"
+      ];
       joypixels.acceptLicense = true;
 
     [1]: ${joypixels-free-license.url}