-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
openmoji-black,openmoji-color: init at 12.0.0 #70177
Conversation
12a2238
to
6a354dd
Compare
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.
Bash reimplementation needs some attention, resulting files don't work for me but that may be an issue locally. See my comment for details.
db3feef
to
65afdce
Compare
Updated to 12.1.0 |
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unpriviledged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
Not stale, stale-bot. Unfortunately though 12.3.0 segfaults scfbuild, so I cannot update this pr to that version. |
Ugggh, 12.4.0 is segfaulting scfbuild too, maybe I should just fetch the prebuilt font |
I would love to finally have these fonts in stable, can you check the state of this again please? I checked out this PR locally, bumped scfbuild to 2.0.0 (13rac1/scfbuild@6d84339), openmoji to 12.4.0 & dropped the patch in openmoji's |
I just tried but it doesn't seem to build for me. Maybe I missed something though. Let's see what ofborg says |
65afdce
to
94b9722
Compare
I bumped those versions without rebasing before, but now I see the crash you were mentioning. I've debugged this down to a problem in
Upstream issue fontforge/fontforge#4315 seems related, should we chime in there with this "real world" example of that crash? In the meantime, we could either try downgrading fontforge for this font's scfbuild or admit defeat and use the prebuilt TTFs. |
pkgs/data/fonts/openmoji/default.nix
Outdated
]; | ||
|
||
buildPhase = '' | ||
# Bash reimplementation of helpers/export-svg-font.js |
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.
Upstream no longer has helpers/export-svg-font.js https://github.com/hfg-gmuend/openmoji/tree/12.4.0/helpers. Also, if possible, I recommend patching source instead of copying-pasting script contents. That is less brittle.
It looks like we are now supposed to run npm run generate-font
: https://github.com/hfg-gmuend/openmoji/tree/12.4.0/helpers#big-helpers.
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 didn't copypaste, I reimplemented it entirely. The reason why I did that instead of using their scripts is that then we'd have to first package the node stuff too (and I see there's some recursive node-bash-docker calls :-/ ), which is a pain.
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.
Upstream no longer has helpers/export-svg-font.js
It was moved to helpers/generate-font-glyphs.js
.
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.
@fgaz I believe we can install node dependencies with node2nix
and patch out the docker
calls, either with sed
or patches
.
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 think the build should be refactored to use the upstream npm run generate-font
. It looks like we are currently building in an unsupported way. That is probably why the build fails for us, but presumably succeeds upstream.
{ stdenv | ||
, fetchFromGitHub | ||
, scfbuild | ||
, python3Packages |
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.
This argument is not used (python3Packages
).
🏳️ 🏳️ 🏳️ |
Afaict upstream builds with a Docker image based on Ubuntu 18.04 (fontforge 2017something) while we have the latest fontforge release packaged instead (fontforge 202003something). With an older nixpkgs revision I was able to build this package without problems, since ~ the bump of fontforge it started crashing as I coarsely bisected earlier. I wasn't sure where exactly to report this back then and was abit stressed with tasks. It's obviously a crash within fontforge as noted earlier, so I'll visit the linked issue later and add our crash example, assuming this is the same issue. Though their report implies that it's due to bad input and will cause visual problems even if it's fixed, so informing the openmoji team of this problem would prolly be a good idea too.
I have a hunch they'll tell us to use their handy docker file or prebuilt font files though 😛. |
@fgaz it looks like both Noto and Twemoji use prebuilt TTFs. I guess there is precident. It would be nice to build from source, but I'm not sure what the practical benefits are. |
Ugh of course it's a mass rebuild... I guess I'll split the
If someone else does and documents it, I'll try to maintain it, but my preference is to stay clear of node stuff. |
@@ -30,6 +30,12 @@ stdenv.mkDerivation rec { | |||
url = "https://salsa.debian.org/fonts-team/fontforge/raw/76bffe6ccf8ab20a0c81476a80a87ad245e2fd1c/debian/patches/0001-add-extra-cmake-install-rules.patch"; | |||
sha256 = "u3D9od2xLECNEHhZ+8dkuv9818tPkdP6y/Tvd9CADJg="; | |||
}) | |||
# Fix segmentation fault with some fonts. | |||
# This is merged and should be present in the next release. | |||
(fetchpatch { |
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.
👍 for the patch.
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.
Should I submit it separately?
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.
If this is causing the mass rebuild than it would be good we can do a PR that targets staging with it and wait until it is in master.
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.
This patch has been upstreamed. We can drop this commit from the PR.
I looked into the build process on their end and it does the follow steps:
2 seems like it causes most of the problems and provides the least value.
3 Seems helpful and I think we can avoid re-implementing it.
So overall I don't mind re-implementing the script but ideally it seems like we would reuse 3. However that wouldn't prevent me from merging this PR. I would appreciate any opposing views on this. |
direct dependencies :) |
Those two npm packages, once added according to https://nixos.org/manual/nixpkgs/stable/#node.js, are enough to get everything running with their JS script. nativeBuildInputs = [
scfbuild
nodejs
nodePackages.glob
nodePackages.lodash
];
buildPhase = ''
runHook preBuild
node helpers/generate-font-glyphs.js
cd font
scfbuild -c scfbuild-${variant}.yml
runHook postBuild
''; |
This segfault appears when trying to build some fonts such as openmoji. See NixOS#70177 for discussion.
This segfault appears when trying to build some fonts such as openmoji. See #70177 for discussion.
needed for openmoji-color
cd4c2f2
to
12d2e28
Compare
Oh nooo a conflict... it took literally multiple hours to regenerate node-packages.nix D: |
Oh, and i guess we should wait for @kevincox's patch to land in master before merging this? |
Alternatively I think it is fine to target staging. |
@fgaz do you mind if I merge this into staging? |
@kevincox ok. could you preserve the intermediate commit with the bash implementation? |
I was just going to merge the commits as is. (And re-gen the node-packages) |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)