8 stdenvNoCC.mkDerivation {
9 pname = "google-fonts";
10 version = "unstable-2024-06-21";
12 # Adobe Blank is split out in a separate output,
13 # because it causes crashes with `libfontconfig`.
14 # It has an absurd number of symbols
20 src = fetchFromGitHub {
23 rev = "d5ea3092960d3d5db0b7a9890c828bafbf159c51";
24 hash = "sha256-jQVwAgrZzdCVD4aaX4vYJLqj67t9vn60bYPuBWWMbBg=";
28 # These directories need to be removed because they contain
29 # older or duplicate versions of fonts also present in other
30 # directories. This causes non-determinism in the install since
31 # the installation order of font files with the same name is not
33 rm -rv ofl/cabincondensed \
35 ofl/signikanegativesc \
37 axisregistry/tests/data
39 if find . -name "*.ttf" | sed 's|.*/||' | sort | uniq -c | sort -n | grep -v '^.*1 '; then
40 echo "error: duplicate font names"
47 # The font files are in the fonts directory and use three naming schemes:
48 # FamilyName-StyleName.ttf, FamilyName[param1,param2,...].ttf, and
49 # FamilyName.ttf. This installs all fonts if fonts is empty and otherwise
50 # only the specified fonts by FamilyName.
51 fonts = map (font: builtins.replaceStrings [ " " ] [ "" ] font) fonts;
54 adobeBlankDest=$adobeBlank/share/fonts/truetype
55 install -m 444 -Dt $adobeBlankDest ofl/adobeblank/AdobeBlank-Regular.ttf
57 dest=$out/share/fonts/truetype
62 find . -name '*.ttf' -exec install -m 444 -Dt $dest '{}' +
66 for font in $fonts; do
67 find . \( -name "$font-*.ttf" -o -name "$font[*.ttf" -o -name "$font.ttf" \) -exec install -m 444 -Dt $dest '{}' +
73 homepage = "https://fonts.google.com";
74 description = "Font files available from Google Fonts";
75 license = with licenses; [
80 platforms = platforms.all;
82 maintainers = with maintainers; [ manveru ];
83 sourceProvenance = [ sourceTypes.binaryBytecode ];