NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.04k forks source link

Build failure: google-fonts #287789

Closed Silveere closed 6 months ago

Silveere commented 8 months ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. choose any font with an incompatible filename (find . -type f -iregex '[^-[]+.ttf' at root of Google Fonts repo)
  2. build with incompatible font; e.g., google-fonts.override { fonts = [ "NovaSquare" ]; }

Build log

this derivation will be built:
  /nix/store/2sa86gwmsrmmk8ivhyi3glx3jn5yzalr-google-fonts-unstable-2023-10-20.drv
building '/nix/store/2sa86gwmsrmmk8ivhyi3glx3jn5yzalr-google-fonts-unstable-2023-10-20.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/ig7wq1hm40ch40gss5c001gxw0dv6wh5-source
source root is source
Running phase: patchPhase
removed 'ofl/cabincondensed/CabinCondensed-Bold.ttf'
removed 'ofl/cabincondensed/CabinCondensed-Medium.ttf'
removed 'ofl/cabincondensed/CabinCondensed-Regular.ttf'
removed 'ofl/cabincondensed/CabinCondensed-SemiBold.ttf'
removed 'ofl/cabincondensed/DESCRIPTION.en_us.html'
removed 'ofl/cabincondensed/FONTLOG.txt'
removed 'ofl/cabincondensed/METADATA.pb'
removed 'ofl/cabincondensed/OFL.txt'
removed directory 'ofl/cabincondensed'
removed 'ofl/signikanegative/DESCRIPTION.en_us.html'
removed 'ofl/signikanegative/FONTLOG.txt'
removed 'ofl/signikanegative/METADATA.pb'
removed 'ofl/signikanegative/OFL.txt'
removed 'ofl/signikanegative/SignikaNegative[wght].ttf'
removed 'ofl/signikanegative/upstream.yaml'
removed directory 'ofl/signikanegative'
removed 'ofl/signikanegativesc/DESCRIPTION.en_us.html'
removed 'ofl/signikanegativesc/FONTLOG.txt'
removed 'ofl/signikanegativesc/METADATA.pb'
removed 'ofl/signikanegativesc/OFL.txt'
removed 'ofl/signikanegativesc/SignikaNegativeSC-Bold.ttf'
removed 'ofl/signikanegativesc/SignikaNegativeSC-Light.ttf'
removed 'ofl/signikanegativesc/SignikaNegativeSC-Regular.ttf'
removed 'ofl/signikanegativesc/SignikaNegativeSC-SemiBold.ttf'
removed directory 'ofl/signikanegativesc'
removed 'ofl/notosansnko_todelist/DESCRIPTION.en_us.html'
removed 'ofl/notosansnko_todelist/METADATA.pb'
removed 'ofl/notosansnko_todelist/NotoSansNKo-Regular.ttf'
removed 'ofl/notosansnko_todelist/OFL.txt'
removed 'ofl/notosansnko_todelist/article/ARTICLE.en_us.html'
removed directory 'ofl/notosansnko_todelist/article'
removed directory 'ofl/notosansnko_todelist'
removed 'axisregistry/tests/data/MavenPro-Regular.ttf'
removed 'axisregistry/tests/data/OpenSans-Italic[wdth,wght].ttf'
removed 'axisregistry/tests/data/OpenSans-Italic[wdth,wght]_STAT.ttx'
removed 'axisregistry/tests/data/OpenSansCondensed-Italic[wght].ttf'
removed 'axisregistry/tests/data/OpenSansCondensed-Italic[wght]_STAT.ttx'
removed 'axisregistry/tests/data/OpenSansCondensed[wght].ttf'
removed 'axisregistry/tests/data/OpenSansCondensed[wght]_STAT.ttx'
removed 'axisregistry/tests/data/OpenSans[wdth,wght].ttf'
removed 'axisregistry/tests/data/OpenSans[wdth,wght]_STAT.ttx'
removed 'axisregistry/tests/data/Playfair[opsz,wdth,wght].ttf'
removed 'axisregistry/tests/data/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght].ttf'
removed 'axisregistry/tests/data/RobotoFlex[GRAD,XOPQ,XTRA,YOPQ,YTAS,YTDE,YTFI,YTLC,YTUC,opsz,slnt,wdth,wght]_STAT.ttx'
removed 'axisregistry/tests/data/Wavefont[ROND,YALN,wght].ttf'
removed 'axisregistry/tests/data/Wavefont[ROND,YALN,wght]_STAT.ttx'
removed 'axisregistry/tests/data/Wonky[wdth,wght].ttf'
removed 'axisregistry/tests/data/Wonky[wdth,wght]_STAT.ttx'
removed directory 'axisregistry/tests/data'
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: installPhase
Running phase: fixupPhase
shrinking RPATHs of ELF executables and libraries in /nix/store/ld9mpvl82ivajk1hjvnl5irqayc5smic-google-fonts-unstable-2023-10-20-adobeBlank
checking for references to /build/ in /nix/store/ld9mpvl82ivajk1hjvnl5irqayc5smic-google-fonts-unstable-2023-10-20-adobeBlank...
patching script interpreter paths in /nix/store/ld9mpvl82ivajk1hjvnl5irqayc5smic-google-fonts-unstable-2023-10-20-adobeBlank
error: builder for '/nix/store/2sa86gwmsrmmk8ivhyi3glx3jn5yzalr-google-fonts-unstable-2023-10-20.drv' failed to produce output path for output 'out' at '/nix/store/2sa86gwmsrmmk8ivhyi3glx3jn5yzalr-google-fonts-unstable-2023-10-20.drv.chroot/nix/store/hs7g16lw9chx6cpys6gsfh4w78ixm8kv-google-fonts-unstable-2023-10-20'

Additional context

This occurs because the find command in the google-fonts build script looks for fonts matching $font-*.ttf or $font[*.ttf, but some of the fonts don't match this format (e.g., Nova Square is NovaSquare.ttf). I've created pull request #286476 which should fix this.

Notify maintainers

@manveru (Should I have pinged you in my pull request? I'm pretty new to contributing to Nixpkgs and open-source in general.)

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

➜  ~ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.77, NixOS, 23.11 (Tapir), 23.11.20240207.6832d0d`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"nixos-23.11"`
 - nixpkgs: `/nix/store/l6ymqz1y4fiy57xh6f3y23zwp0i9lr4f-source`

Add a :+1: reaction to issues you find important.

Silveere commented 6 months ago

Fixed in #286476