-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Create top-level fonts namespace #18928
Conversation
@chris-martin, thanks for your PR! By analyzing the annotation information on this pull request, we identified @edolstra, @aszlig and @ttuegel to be potential reviewers |
7e5722f
to
dd4ab0e
Compare
Awesome! Thanks for working on this! I think it might be appropriate to maintain aliases to the old attribute names for a release cycle to not break peoples' configuration unexpectedly. I also think this change could use a mention in the release notes. This is also a good opportunity to clean up the attribute names, for example, instead of |
Agreed, done. |
Nice! |
I already did - Is there something I missed? |
I'm confused about where to update the release notes - Why hasn't |
Oops, sorry I missed that changes. |
@chris-martin I think the release-notes for nixpkgs are unmaintained since the merge of |
I think another nice cleanup would be removing |
Should we remove "ttf" from font package names too, or is that meaningful? |
|
@@ -34,6 +34,9 @@ following incompatible changes:</para> | |||
<literal>gtk</literal>, <literal>gtkmm</literal> and several others. | |||
Now you need to use versioned attributes, like <literal>gnome3</literal>. | |||
</para> | |||
<para> | |||
All font packages have been moved into `nixpkgs.fonts`. |
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.
Note that this is not Markdown, so please use something like <literal>
instead of backticks.
|
||
crimson = callPackage ../data/fonts/crimson {}; | ||
|
||
dejavu = lowPrio (callPackage ../data/fonts/dejavu-fonts { |
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.
Generally the attribute name should match the package name, so this should still be dejavu-fonts
. Otherwise we should also rename google-fonts
to google
etc.
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 confused by this. Seems like an attribute path of fonts.google
and a package name of google-fonts
makes a lot of sense?
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 if this can be relevant for fonts, but input method engines also have attribute names that differs from package names to avoid redundancy. (The attribute path is enough to remove any ambiguity)
fcitx-engines = recurseIntoAttrs {
anthy = callPackage ../tools/inputmethods/fcitx-engines/fcitx-anthy { };
chewing = callPackage ../tools/inputmethods/fcitx-engines/fcitx-chewing { };
hangul = callPackage ../tools/inputmethods/fcitx-engines/fcitx-hangul { };
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 inclined to agree that allowing different names in this case makes sense. But I would suggest adopting Debian style package name with a fonts-
prefix rather than a -fonts
suffix for all font packages, so that alphanumeric sorting clumps them together. That is, fonts-google
, fonts-dejavu
, fonts-font-awesome
, etc.
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.
Actually, thinking about this a bit more, I'm not sure if putting fonts in a separate set is a good idea. We've generally not used attribute sets to partition packages, e.g. we don't put all compilers in a The use of sets also makes it harder to guess the name of a package. E.g. if you know about the existence of package |
Perhaps the |
Are package sets like |
Hi all, it would be nice to have some closure of this. I would propose choosing one of the following three options:
Do these seem reasonable? Is there anything I have missed? |
Option 3 seems sensible to me. Clearly the flatness of the nixpkgs object is more revered than I previously thought, but the initial excitement for this tells me that there's still a general desire for cleanup. |
I guess this effort is dead. |
Motivation for this change
#18855
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)