take nerd-fonts.iosevka
as an example. I’ve been looking around and it seems there is no function that receives a font package and return a list of font families inside it.
What are my other alternatives?
take nerd-fonts.iosevka
as an example. I’ve been looking around and it seems there is no function that receives a font package and return a list of font families inside it.
What are my other alternatives?
What sort of ‘function’ do you mean? (A Nix function is unlikely to do this, since Nix derivations don’t generally include information about what their outputs will contain.)
What are you trying to do?
For a given package, I would like to know the font family so I can plug that into the configuration of an app, say for instance alacritty.
If you want the information during the build of a derivation (perhaps a derivation that produces a config file), you could depend on fontconfig
and run fc-scan -f "%{family}\n" ${your-font-package}
.
If you want the information during eval, you’ll have to do something nasty with IFDs.