Nixpkgs: twemoji-color-font: Use release tarball font instead of building from source to reduce build times?

Created on 13 Sep 2020  路  11Comments  路  Source: NixOS/nixpkgs

The package twemoji-color-font takes a long time to build the individual glyphs using e.g. 1.5 hours on Hydra.

See also https://github.com/eosrei/twemoji-color-font/issues/83.

Other distros simply use the release tarball (e.g. AUR here) which already has the resulting 13 MB .ttf file prebuilt.

Should we do this as well, given that it's a font?

CC maintainer: @fgaz

enhancement

Most helpful comment

Ow. Well, that's a good enough reason to switch I guess :)

I'll open a pr.
edit: or I could Increase the timeout >:)

All 11 comments

I'm conflicted: on one hand NixOS is a source based distribution and building from source makes it possible to apply patches and whatnot, but on the other it's just a font without any executable stuff and 1.5 hours is a lot.

I guess it depends on how valuable build time is?

It seems quite common for fonts in nixpkgs to use the upstream-release-provided font files; examples I picked randomly by clicking around in fonts/:

Some fonts are generated by a call to fontforge, for example libertine, but there doesn't seem to be a requirement for that.

So I propose to make twemoji-color-font one of the former category.

In current settings the job often times out on Hydra (and needs to be restarted manually). EDIT: confused with twitter-color-emoji

Ow. Well, that's a good enough reason to switch I guess :)

I'll open a pr.
edit: or I could Increase the timeout >:)

cc @jtojnar

I have a sentiment for source builds but no rational arguments. The above arguments for building twemoji-color-font from source are reasonable.

We also have twitter-color-emoji package for a bitmap version of the font (using build system from Noto). That artefact is not available upstream so we need to build it ourselves, unless we want to depend on Fedora.

I have a sentiment for source builds but no rational arguments

Yeah, I'm similar (at least for fonts, outside fonts there's many rational arguments :rofl: ). And I think considering how it times out... It's the best choice for now as there's not a ton of benefit to argue. Though https://github.com/eosrei/twemoji-color-font/issues/83 doesn't seem to be incredibly difficult to do :frowning_face.

edit: or I could Increase the timeout >:)

I think in practice this is still not going to address the root issue that the calling of inkscape is highly inefficient.
Hehe, I bet nix being content addressed would make a lot of us much happier with not having to rebuild stuff pointlessly.

In current settings the job often times out on Hydra (and needs to be restarted manually).

I'm sorry, I confused the two packages. It's apparently the other one that's timing out on Hydra: https://hydra.nixos.org/job/nixos/release-20.03/nixpkgs.twitter-color-emoji.x86_64-linux

I think in practice this is still not going to address the root issue that the calling of inkscape is highly inefficient.

Even with the 5x speedup I found in https://github.com/eosrei/twemoji-color-font/issues/83 it'd still take 20 minutes to build it though.

If somebody goes through the effort of fixing it upstream, we may want to consider switching back to fully-from-source. But there are 1000s of open-source tasks higher than this on my list :)

But there are 1000s of open-source tasks higher than this on my list :)

Can relate. (says ever opensource contributor ever while submitting 10x README PRs in a day :grin: )

Was this page helpful?
0 / 5 - 0 ratings