NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.3k stars 14.27k forks source link

Module request: 1. force fonts 2. zstd b3sum 3. enable compilation optimization #355147

Open eqfae opened 1 week ago

eqfae commented 1 week ago

Description

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/fontconfig/default.nix

  fonts = lib.mkForce {
    enableDefaultPackages = false;
    fontconfig.enable = true;
    fontDir.enable = true;
    packages = with pkgs; [
      jetbrains-mono
    ];

but

/nix/store/6rvfplkwwbipv2ky3zcab0w9fvib9cgc-dejavu-fonts-minimal-2.37/share/fonts/truetype/DejaVuSans.ttf: DejaVu Sans:style=Book

It would be even better if you could ignore any font at the system level and force custom fonts. Many programs don't even have the option of adjusting fonts. Also for jetmoon there are too many fonts

/nix/store/24k3h17j8pk65ha19bibs9im3328f962-jetbrains-mono-2.304/share/fonts/truetype/JetBrainsMono[wght].ttf: JetBrains Mono:style=Bold
/nix/store/24k3h17j8pk65ha19bibs9im3328f962-jetbrains-mono-2.304/share/fonts/truetype/JetBrainsMono-Italic[wght].ttf: JetBrains Mono:style=Thin Italic

Generally, only these two fonts are needed. Variable fonts contain any font weight.

2. zstd

zstd compression I think it's already been mentioned, but for speed I have two points

  1. Use faster hash algorithms like b3sum Even xxhash https://github.com/Cyan4973/xxHash/wiki/Performance-comparison
  2. For advanced filesystems such as btrfs that support zstd Can duplicate decompression and compression be avoided on updates Compression levels on source servers are usually higher Verify only trusted signatures and checksums

    3. O3 pgo lto..

Notify maintainers


Note for maintainers: Please tag this issue in your PR.


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

Pandapip1 commented 1 week ago

This should be three separate module requests.

eqfae commented 3 days ago

The latter two should both have similar ones, but they're not making any progress Mandatory fonts are also difficult. Some software comes with fonts

Pandapip1 commented 2 days ago

Yes, but each issue should be tracked individually, so they can be linked to and closed individually. Additionally, the phrasing is not very clear, and multiple issues would help to localize discussion.