Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nh2 opened this issue Sep 12, 2020 · 12 comments · Fixed by #110186
Closed
Labels
0.kind: enhancement Add something new

Comments

@nh2
Copy link
Contributor

nh2 commented Sep 12, 2020

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

See also 13rac1/twemoji-color-font#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

@fgaz
Copy link
Member

fgaz commented Sep 14, 2020

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?

@nh2
Copy link
Contributor Author

nh2 commented Sep 14, 2020

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.

@vcunat
Copy link
Member

vcunat commented Sep 14, 2020

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

@fgaz
Copy link
Member

fgaz commented Sep 14, 2020

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

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

@worldofpeace
Copy link
Contributor

cc @jtojnar

@jtojnar
Copy link
Member

jtojnar commented Sep 15, 2020

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.

@worldofpeace
Copy link
Contributor

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 🤣 ). 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 13rac1/twemoji-color-font#83 doesn't seem to be incredibly difficult to do :frowning_face.

@worldofpeace
Copy link
Contributor

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.

@vcunat
Copy link
Member

vcunat commented Sep 15, 2020

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

@nh2
Copy link
Contributor Author

nh2 commented Sep 17, 2020

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 13rac1/twemoji-color-font#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 :)

@worldofpeace
Copy link
Contributor

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 😁 )

fgaz added a commit to fgaz/nixpkgs that referenced this issue Jan 20, 2021
Building from sources takes 1.5 hours on hydra for minimal advantages.
Relevant discussion:
NixOS#97871
@fgaz
Copy link
Member

fgaz commented Jan 20, 2021

#110186

@ghost ghost closed this as completed in #110186 Feb 11, 2021
ghost pushed a commit that referenced this issue Feb 11, 2021
Building from sources takes 1.5 hours on hydra for minimal advantages.
Relevant discussion:
#97871
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants