NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.47k stars 13.66k forks source link

openmoji-15.0.0 openmoji-color 1.5hr build time #297644

Closed BirdeeHub closed 5 months ago

BirdeeHub commented 6 months ago

Describe the bug

A clear and concise description of what the bug is.

I did nix flake update on unstable, with openmoji-color installed like so

  fonts.packages = with pkgs; [
    openmoji-color
    noto-fonts-emoji
    (nerdfonts.override { fonts = [ "FiraMono" "Go-Mono" ]; })
  ];
  fonts.fontconfig = {
    enable = true;
    defaultFonts = {
      serif = [ "GoMono Nerd Font Mono" ];
      sansSerif = [ "FiraCode Nerd Font Mono" ];
      monospace = [ "FiraCode Nerd Font Mono" ];
      emoji = [ "OpenMoji Color" "OpenMoji" "Noto Color Emoji" ];
    };
  };
  fonts.fontDir.enable = true;

It then took 1.5 hours to build.

Apparently the hydra build failed, and Im being informed that this is why it took so long and that I should make a bug report.

https://hydra.nixos.org/build/253540596

Steps To Reproduce

Steps to reproduce the behavior:

  1. ... be on nixpkgs-unstable
  2. ... install openmoji-color like above in a nixos module
  3. ... nix flake update, then rebuild.

Expected behavior

A clear and concise description of what you expected to happen.

I expected it to take the same, short amount of time it usually does to install openmoji. It does not normally take 1.5hrs to build it, in fact usually I can install my ENTIRE config from scratch in 30 mins.

Additional context

Add any other context about the problem here.

https://www.reddit.com/r/NixOS/comments/1bjv7zg/openmoji_has_been_building_for_45_mins_when_does/

Notify maintainers

@999eagle @fgaz

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.8.1, NixOS, 24.05 (Uakari), 24.05.20240319.7872526`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/bv68i4l7g6s5sixxm0c9lcjdxhlkg0n5-source`

my config

https://github.com/BirdeeHub/birdeeSystems

fgaz commented 6 months ago

Looks like the build was canceled for some reason. x86_64 builds on trunk are timing out or failing without an apparent reason, but aarch64 builds complete in as short of a time as 12 minutes. I'm not sure what's going on. I suspect we need the package to require the big-parallel feature since the aarch64 builders are much more parallel than the x86_64 ones.

If you don't mind I'd like to wait for the next build cycle before trying to fix this. Maybe it's just a transient failure

999eagle commented 6 months ago

Upstream openmoji changed their build system completely between 14 and 15, so the builds for openmoji 15 take a lot longer but have a lot more font features available as well. There isn't really anything we can do here in nixpkgs to make the build faster. @fgaz The build has a (short) parallel build phase, but as the build tool (nanoemoji) is written in python the main part just takes a long time on a single CPU core. The big-parallel feature probably won't improve build times a lot either.

BirdeeHub commented 6 months ago

The build has a (short) parallel build phase, but as the build tool (nanoemoji) is written in python the main part just takes a long time on a single CPU core. The big-parallel feature probably won't improve build times a lot either.

This is what I noticed. It was a single 1 threaded python script (almost) the entire time.

Hmm.... interesting stuff I guess....

BirdeeHub commented 5 months ago

IDK if you did anything, but it seems fixed. Just updated on another computer with the same stuff, I had not updated it since making this issue. It did not take 1.5 hrs to build openmoji this time.