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.
This commit is contained in:
Ivan Timokhin 2023-08-20 17:40:34 +03:00
parent 377a39f0a2
commit efb9f909d6
3 changed files with 19 additions and 13 deletions

View File

@ -339,6 +339,8 @@
- `mkDerivation` now rejects MD5 hashes.
- The `junicode` font package has been updated to [major version 2](https://github.com/psb1558/Junicode-font/releases/tag/v2.001), which is now a font family. In particular, plain `Junicode.ttf` no longer exists. In addition, TrueType font files are now placed in `font/truetype` instead of `font/junicode-ttf`; this change does not affect use via `fonts.packages` NixOS option.
## Other Notable Changes {#sec-release-23.11-notable-changes}
- The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.

View File

@ -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
'';

View File

@ -65,10 +65,12 @@ in
cp -r lib-satysfi/dist/ $out/share/satysfi/
cp -r \
${ipaexfont}/share/fonts/opentype/* \
${junicode}/share/fonts/junicode-ttf/* \
${lmodern}/share/fonts/opentype/public/lm/* \
${lmmath}/share/fonts/opentype/latinmodern-math.otf \
$out/share/satysfi/dist/fonts
${junicode}/share/fonts/truetype/Junicode-{Bold,BoldItalic,Italic}.ttf \
$out/share/satysfi/dist/fonts/
cp ${junicode}/share/fonts/truetype/Junicode-Regular.ttf \
$out/share/satysfi/dist/fonts/Junicode.ttf
'';
meta = with lib; {