this post was submitted on 05 Mar 2026
4 points (100.0% liked)

NixOS

1336 readers
1 users here now

NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels of stability and size.

This community discusses NixOS, Nix, and everything related.

founded 2 years ago
MODERATORS
 

I'm trying to write a package for the Zen Maru Gothic font, which is available on Google's font repository on github. (https://github.com/google/fonts) It's a huge repo with thousands of fonts, so I'm trying to use sparseCheckout to grab only the part I need:

src = pkgs.fetchgit {
   url = "https://github.com/google/fonts.git";
   rev = "v0.4.9";
   sha256 = #snip long hash;
   sparseCheckout = [ "ofl/zenmarugothic" ];
};

I was originally using fetchFromGitHub pointed at the same repo. In both cases, what's actually being fetched into the store seems to be the root directory of the Google Fonts Axis Registry repository (https://github.com/googlefonts/axisregistry) which has a different url, name, and owner.

I feel like I'm going crazy.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] toboidev@programming.dev 3 points 2 weeks ago (1 children)

The referenced version 4.0.9 (https://github.com/google/fonts/tree/v0.4.9) doesn't contain the subdirectory ofl and looks somewhat like the other repository. So maybe it actually works as intended?

[โ€“] Malgas@beehaw.org 2 points 2 weeks ago

Yup, that'll be it. Guess I looked at the most recent tag, saw a date in late February, and skipped past the year entirely, assuming it must be recent.