Skip to content
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

Font joypixels emoji #94892

Merged
merged 15 commits into from Oct 22, 2020
Merged

Font joypixels emoji #94892

merged 15 commits into from Oct 22, 2020

Conversation

toonn
Copy link
Contributor

@toonn toonn commented Aug 7, 2020

Motivation for this change

The JoyPixels emoji font (formerly EmojiOne) was packaged using a CDN endpoint created for Arch Linux.
Arch Linux received an altered license for distribution of the font. Furthermore, the license requires explicit acceptance from users. And last but not least, as-is the font doesn't work on macOS.

I expect foss licenses to be complied to. In turn, this means we should respect the terms other projects put in their licenses. I contacted the JoyPixels licensing team and they were happy to provide CDN endpoints and similarly altered licenses for distribution of their font for NixOS and nix-darwin.

I altered the expression to work on macOS, which requires downloading and installing a "TrueType Collection" file rather than the TrueType font file. I also updated the licensing information and the package now requires an override to indicate acceptance of the license before you can install it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

pkgs/data/fonts/joypixels/default.nix Outdated Show resolved Hide resolved
pkgs/data/fonts/joypixels/default.nix Outdated Show resolved Hide resolved
pkgs/data/fonts/joypixels/default.nix Outdated Show resolved Hide resolved
pkgs/data/fonts/joypixels/default.nix Outdated Show resolved Hide resolved
pkgs/data/fonts/joypixels/default.nix Outdated Show resolved Hide resolved
@toonn toonn force-pushed the font-joypixels-emoji branch 2 times, most recently from 998035f to e6c9a23 Compare September 16, 2020 21:31
@jtojnar jtojnar mentioned this pull request Sep 22, 2020
10 tasks
doronbehar added a commit to doronbehar/nixpkgs that referenced this pull request Sep 22, 2020
Do it before buildInputs per:
NixOS#94892 (comment)

Remove unneed, BLAS_LIBS and LAPACK_LIBS from environment - the
libraries are detected just fine when in buildInputs.
doronbehar added a commit to doronbehar/nixpkgs that referenced this pull request Sep 22, 2020
Use `pname` and `version`. Use my preferred indentation style. Use
makeFlagsArray in preBuild instead of overriding configurePhase, per:
https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/explicit-phases.md

Assert that lapack and blas are compatible regarding 64 bit indexing, do
it near evaluation of preBuild, per jtojnar's explanation:
NixOS#94892 (comment)

Use gpl3Plus, as gpl3 is unclear and deprecated.
@toonn toonn marked this pull request as ready for review October 21, 2020 12:08
@toonn
Copy link
Contributor Author

toonn commented Oct 21, 2020

Whoops, been waiting on activity for this. Could've sworn I'd pressed the ready-for-review button before.

The Arch Linux endpoint was not intended to be used as-is by other
distros. I have asked for and received a proper license with a dedicated
endpoint for NixOS.
The JoyPixels font comes with a license which requires explicit
acceptance by the user.
Switch from an overridden variable to an option specified in
configuration.nix or config.nix:
  ```
  joypixels.acceptLicense = true;
  ```
Specifying the system-specific variables for x86_64-darwin and
x86_64-linux is too restrictive, excluding for example i686-linux.
Since macOS seems to be the odd one out we can special-case only
x86_64-darwin.
x86_64-darwin is too specific because macOS runs on multiple
architectures.
toonn and others added 6 commits October 22, 2020 03:32
The url was changed on request.
By moving the assert concerning license acceptance into the src
attribute license acceptance can be expressed with an override,
`joypixels.override { acceptLicense = true; }`.
After some back and forth with JoyPixels they agreed to creating a
version of their font for macOS that does not use the exact same name as
the Apple Color Emoji default font.

This naming collision meant it was impossible to configure applications
to use the JoyPixels emoji font unless you disabled the Apple Color
Emoji font using Font Book. Which meant the JoyPixels font could either
replace the Apple Color Emoji font completely or only fill in the gaps
in that font (on my system "hot face" isn't in the system font) but not
be used entirely for specific apps or be used with the system font as a
back up.
Also clean up formatting.
Copy link
Contributor

@jtojnar jtojnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work for me, thanks.

@jtojnar jtojnar merged commit 03c6413 into NixOS:master Oct 22, 2020
@doronbehar doronbehar mentioned this pull request Nov 15, 2020
10 tasks
doronbehar added a commit to doronbehar/nixpkgs that referenced this pull request Dec 5, 2020
Instead of asserting that lapack and blas are both not using 64 bit
index size, only make sure they are index size compatible. Plus, do it
when evaluating buildInputs, per:
NixOS#94892 (comment)

Don't pass SUNDIALS_INDEX_TYPE=int32_t if blas && lapack are compiled
with 64 bit index size.

Bonus: Use checkTarget and not an overrided checkPhase, per:
https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/explicit-phases.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants