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
Add new fonts #39477
Add new fonts #39477
Conversation
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.
All my comments on Sarasa Gothic also apply to Inziu Iosevka
@@ -0,0 +1,32 @@ | |||
{stdenv, fetchurl, p7zip}: |
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.
Nitpick: Spaces before stdenv
and after p7zip
is the convention.
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.
Thanks for pointing out these improvements, I'll do an update.
@@ -0,0 +1,32 @@ | |||
{stdenv, fetchurl, p7zip}: | |||
|
|||
stdenv.mkDerivation (rec { |
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.
The (
around here isn't needed.
|
||
unpackPhase = '' | ||
7z x $package | ||
''; |
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.
Instead of fetching the already prebuilt release, can you try to make the build with Nix instead?
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.
Sorry, that seems more involved, and I currently don't have time for that. I may look into this later.
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.
What is the advantage of building fonts from source?
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.
Then it doesn't depend on sombody making the releases available. The source can be freely changed to a different one. E.g. In case the orginal one gets deleted.
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.
Sources can be vanished as well, but the tarball url here looks indeed strange.
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'm thinking of git clones, if anybody forks/clones the repo the sources aren't lost.
cp *.ttf $out/share/fonts/truetype | ||
''; | ||
|
||
phases = [ "unpackPhase" "installPhase" ]; |
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.
Setting phases directly is very discouraged, should work without 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.
Could you give a hint which is the preferred way?
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.
Oh, I got it. I'll do another update.
|
||
phases = [ "unpackPhase" "installPhase" ]; | ||
|
||
meta = { |
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.
To avoid having to prefix stdenv.lib
to the lines below, you can use meta = with stdenv.lib; {
here instead.
|
||
meta = { | ||
description = "Inziu Iosevka font"; | ||
homepage = https://be5invis.github.io/Iosevka/inziu; |
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'm not sure if it makes sense to package a deprecated font which has been superseded by the Sarasa Gothic one, other than for historical record. Is there any reason anybody would want to use this one instead of Sarasa Gothic?
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 am having issues with Sarasa Gothic. While Inziu Iosevka is deprecated by the author, it seems more stable.
Build is i/o bound
Build is i/o bound
Both fonts were really large so I disabled hydra builds. This should not affect the user experience since it does not make it a big difference if the original archive is unpacked or our one. |
Motivation for this change
Add 2 new fonts by @be5invis
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)