-
-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
[WIP] noto-fonts: build from source #331341
base: master
Are you sure you want to change the base?
Conversation
Some scattered thoughts:
|
Am I correct in thinking that this approach requires one package per font? So we would have to write a script to parse https://github.com/notofonts/notofonts.github.io/blob/main/fontrepos.json (or whatever the right file is), and generate a package set, like how we have Hackage embedded into Nixpkgs? I agree with emilazy that this approach is likely to be slow and have no tangible benefits, but it is still the right approach, kudos for working on it. ;-) |
A font can contain web-assembly so i would only but as much trust in a font as i put in any pre compiled binary.
Currently this does not have any tests, but probably not because most of these have set number characters which does not really change.
I sadly do not know the current state of the rust font tool-chain.
Yes
I was intending to create a package that symlinks all the noto packages into one and than check that against https://github.com/notofonts/notofonts.github.io/tree/main/fonts in the check phase to see if anything is missing.
Definitely slower than just downloading font, but better than trusting random binary's from the internet. |
pkgs/by-name/sk/skia/package.nix
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix header files
what does this fix specifically? isn't $prefix/include/$pname the conventional location? not that it should change anything when pkgconfig is used...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I know only the /include
dir get added to the include flags and not /include/$pname
, but what is common is that some library's put their headers under /include/$name_chosen_by_lib
, but in this case, the include statement would need to look something like #INCLUDE </$name_chosen_by_lib/a_header.h>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this change is a great idea, I know e.g. some browsers use skia. Changing this package over a font seems backwards to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried compiling ladybird with that change, and it still worked, I don't know any other package that currently uses our variant of skia and not a vendored one.
But properly going to drop the skia stuff from this pr as it is not strictly necessary for building these fonts and currently doesn't work for skia-python correctly due to some undefined symbols.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I know only the
/include
dir get added to the include flags and not/include/$pname
, but what is common is that some library's put their headers under/include/$name_chosen_by_lib
, but in this case, the include statement would need to look something like#INCLUDE </$name_chosen_by_lib/a_header.h>
I see what you mean, you're right on the convention. It would be nice if skia headers were namespaced (#include <skia/...>
), but they aren't.
Still, other distros put skia header files under include/skia anyway. I think it's because skia headers include generic directory names ("core", "config", "docs", "svg"...) that would pollute the FHS (not sure about guix). We are not restricted by the FHS, but I'd still like to maintain consistency with other distros if possible.
Not sure this change is a great idea, I know e.g. some browsers use skia.
I tried compiling ladybird with that change, and it still worked
Indeed ladybird uses pkg-config, so it's going to work regardless of the headers' location. Other browsers vendor it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always append to the include dir to cflags like we do with harfbuzz for skia, so I'm not really set to what i did in that commit.
Well, to get into a long digression, they are from Google, so not "random". I sure wish I didn't have to trust binary drivers to use my phone either, but that's life. For me it is more about transparency in the toolchain. If you can't build it you can't reproduce it or make changes. Whereas, if there is a Nix script, I know pretty much exactly what I have to do: |
For me, it pretty much all of those too, and just because I don't trust something it doesn't mean I'm not making use of it. |
Description of changes
This is a work in progress of building noto-fonts from source, the main thing still to-do is adding the rest of the noto fonts from https://github.com/notofonts, but before doing that I wanted to gather some feed back on this.
cc @emilazy @Mathnerd314 as the ones currently maintaining noto-fonts together with me.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.