From 09426fe8710936526444619b21dc349cb9efc917 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 22 Apr 2024 12:14:47 +0200 Subject: [PATCH 1/4] joypixels: 6.6.0 -> 8.0.0 Skipped version 7 because we were never provided with a URL for Darwin. The license is still version 6.5 because we haven't been provided with an updated reference. --- pkgs/data/fonts/joypixels/default.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix index 593817275669..2d1296b8cf34 100644 --- a/pkgs/data/fonts/joypixels/default.nix +++ b/pkgs/data/fonts/joypixels/default.nix @@ -20,8 +20,8 @@ let }; joypixels-free-license = with systemSpecific; { - spdxId = "LicenseRef-JoyPixels-Free-6.0"; - fullName = "JoyPixels Free License Agreement 6.0"; + spdxId = "LicenseRef-JoyPixels-Free-6.5"; + fullName = "JoyPixels Free License Agreement 6.5"; url = "https://cdn.joypixels.com/distributions/${systemTag}/license/free-license.pdf"; free = false; }; @@ -58,15 +58,15 @@ in stdenv.mkDerivation rec { pname = "joypixels"; - version = "6.6.0"; + version = "8.0.0"; src = assert !acceptLicense -> throwLicense; with systemSpecific; fetchurl { name = fontFile; url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}"; sha256 = { - darwin = "0qcmb2vn2nykyikzgnlma627zhks7ksy1vkgvpcmqwyxq4bd38d7"; - }.${kernel.name} or "17gjaz7353zyprmds64p01qivy2r8pwf88nvvhi57idas2qd604n"; + darwin = "0kj4nck6k91avhan9iy3n8hhk47xr44rd1lzljjx3w2yzw1w9zvv"; + }.${kernel.name} or "1bkyclgmvl6ppbdvidc5xr1g6f215slf0glnh5p6fsfbxc5h95bw"; }; dontUnpack = true; @@ -82,9 +82,10 @@ stdenv.mkDerivation rec { meta = with lib; { description = "The finest emoji you can use legally (formerly EmojiOne)"; longDescription = '' - Updated for 2021! JoyPixels 6.6 includes 3,559 originally crafted icon - designs and is 100% Unicode 13.1 compatible. We offer the largest - selection of files ranging from png, svg, iconjar, sprites, and fonts. + Updated for 2023! JoyPixels 8.0 includes 3,702 originally crafted icon + designs and is 100% Unicode 15.0 compatible. We offer the largest + selection of files ranging from png, svg, iconjar, and fonts (sprites + available upon request). ''; homepage = "https://www.joypixels.com/fonts"; license = @@ -92,7 +93,7 @@ stdenv.mkDerivation rec { free-license = joypixels-free-license; appendix = joypixels-license-appendix; in with systemSpecific; { - spdxId = "LicenseRef-JoyPixels-Free-6.0-with-${capitalized}-Appendix"; + spdxId = "LicenseRef-JoyPixels-Free-6.5-with-${capitalized}-Appendix"; fullName = "${free-license.fullName} with ${appendix.fullName}"; url = free-license.url; appendixUrl = appendix.url; From 74e591dc460a04eea2e835ee2f3787cf19fa2222 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 22 Apr 2024 13:16:01 +0200 Subject: [PATCH 2/4] 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. --- pkgs/data/fonts/joypixels/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix index 2d1296b8cf34..b54aaefa10c7 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} From 3317c406d42ca3cf54bac8ba036d5e8cb742a5d8 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 22 Apr 2024 13:22:43 +0200 Subject: [PATCH 3/4] joypixels: Add sourceProvenance and prevent building on Hydra --- pkgs/data/fonts/joypixels/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix index b54aaefa10c7..f10ecd0483c7 100644 --- a/pkgs/data/fonts/joypixels/default.nix +++ b/pkgs/data/fonts/joypixels/default.nix @@ -93,6 +93,7 @@ stdenv.mkDerivation rec { available upon request). ''; homepage = "https://www.joypixels.com/fonts"; + hydraPlatforms = []; # Just a binary file download, nothing to cache. license = let free-license = joypixels-free-license; @@ -105,5 +106,8 @@ stdenv.mkDerivation rec { free = false; }; maintainers = with maintainers; [ toonn jtojnar ]; + # Not quite accurate since it's a font, not a program, but clearly + # indicates we're not actually building it from source. + sourceProvenance = sourceTypes.binaryNativeCode; }; } From 1c8fd6eb611d27ff7e410a33d73ed5df1363c3d3 Mon Sep 17 00:00:00 2001 From: toonn Date: Tue, 30 Apr 2024 17:13:38 +0200 Subject: [PATCH 4/4] joypixels: Switch to general JoyPixels Free License Our references to the Free License have never been updated. I've received permission to link to the general license instead. This means the license version is no longer pinned, though that does not seem worse than being out of sync with the actual font and they don't seem to have versioned references. If the license is updated again before we receive new links for the font files users will be prompted to agree to a newer version of the license than the font. On the JoyPixels website if you navigate to older font versions, which are still available for download, you're also pointed to the newest version of the license. So we aren't doing worse. Note, although it's the JoyPixels Free License, this is actually an unfree license because it prohibits commercial use. --- pkgs/data/fonts/joypixels/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix index f10ecd0483c7..1371634dbf52 100644 --- a/pkgs/data/fonts/joypixels/default.nix +++ b/pkgs/data/fonts/joypixels/default.nix @@ -20,9 +20,9 @@ let }; joypixels-free-license = with systemSpecific; { - spdxId = "LicenseRef-JoyPixels-Free-6.5"; - fullName = "JoyPixels Free License Agreement 6.5"; - url = "https://cdn.joypixels.com/distributions/${systemTag}/license/free-license.pdf"; + spdxId = "LicenseRef-JoyPixels-Free"; + fullName = "JoyPixels Free License Agreement"; + url = "https://cdn.joypixels.com/free-license.pdf"; free = false; }; @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { free-license = joypixels-free-license; appendix = joypixels-license-appendix; in with systemSpecific; { - spdxId = "LicenseRef-JoyPixels-Free-6.5-with-${capitalized}-Appendix"; + spdxId = "LicenseRef-JoyPixels-Free-with-${capitalized}-Appendix"; fullName = "${free-license.fullName} with ${appendix.fullName}"; url = free-license.url; appendixUrl = appendix.url;