From efb9f909d6102d8f7eb02c2bec049a391578f6d4 Mon Sep 17 00:00:00 2001 From: Ivan Timokhin Date: Sun, 20 Aug 2023 17:40:34 +0300 Subject: junicode: 1.003 -> 2.001 Release announcement: https://github.com/psb1558/Junicode-font/releases/tag/v2.001 This is a breaking change, at least in font file naming (Junicode.ttf is now Junicode-Regular.ttf). In general, 2.0 adds a lot more font variants and opentype and web font versions of the font. Seeing as backward compatibility is broken anyway, I opted to break it a bit more and change custom install path (`junicode-ttf`) to seemingly more conventional `truetype`; new .otf and .woff2 variants are then naturally placed in corresponding directories. This does *not* affect the `fonts.packages` NixOS option, which rearranges font files anyway, but brings a degree of consistency with other fonts. Both the file renaming and the directory structure change break satysfi, however, so I adjusted its builder accordingly, copying over only those font variants that were also present in 1.0 series. --- pkgs/data/fonts/junicode/default.nix | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'pkgs/data/fonts') diff --git a/pkgs/data/fonts/junicode/default.nix b/pkgs/data/fonts/junicode/default.nix index 4e42cf1c417..622f9d84161 100644 --- a/pkgs/data/fonts/junicode/default.nix +++ b/pkgs/data/fonts/junicode/default.nix @@ -1,22 +1,24 @@ -{ lib, stdenvNoCC, fetchFromGitHub }: +{ lib, stdenvNoCC, fetchzip }: -stdenvNoCC.mkDerivation { +stdenvNoCC.mkDerivation rec { pname = "junicode"; - version = "1.003"; + version = "2.001"; - src = fetchFromGitHub { - owner = "psb1558"; - repo = "Junicode-font"; - rev = "55d816d91a5e19795d9b66edec478379ee2b9ddb"; - hash = "sha256-eTiMgI8prnpR4H6sqKRaB3Gcnt4C5QWZalRajWW49G4="; + src = fetchzip { + url = "https://github.com/psb1558/Junicode-font/releases/download/v${version}/Junicode_${version}.zip"; + hash = "sha256-AEbRU0KiB9gLdxcXn8Mn/XLjBEm0qa4cV6+xE1HKU5s="; }; + outputs = [ "out" "doc" ]; + installPhase = '' runHook preInstall - local out_ttf=$out/share/fonts/junicode-ttf - mkdir -p $out_ttf - cp legacy/*.ttf $out_ttf + install -Dt $out/share/fonts/truetype TTF/*.ttf VAR/*.ttf + install -Dt $out/share/fonts/opentype OTF/*.otf + install -Dt $out/share/fonts/woff2 WOFF2/*.woff2 + + install -Dt $doc/share/doc/${pname}-${version} docs/*.pdf runHook postInstall ''; -- cgit 1.4.1