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 Sep 16, 2020
@jtojnar jtojnar mentioned this pull request Sep 22, 2020
10 tasks
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Sep 22, 2020
Use `pname` and `version`. Use my preferred indentation style. Assert
that lapack and blas are compatible regarding 64 bit indexing, do it
near evaluation of configurePhase, per @jtojnar's explanation:
NixOS#94892 (comment)
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Sep 22, 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
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Sep 22, 2020
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue 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 issue Sep 22, 2020
Use `pname` and `version`. Use my preferred indentation style. Use
makeFlags and NIX_LDFLAGS instead of overriding configurePhase.

Assert that lapack and blas are compatible regarding 64 bit indexing, do
it near evaluation of makeFlags, per @jtojnar's explanation:
NixOS#94892 (comment)
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Sep 22, 2020
Use `pname` and `version`. Use my preferred indentation style. Use
makeFlags and NIX_LDFLAGS instead of overriding configurePhase.

Assert that lapack and blas are compatible regarding 64 bit indexing, do
it near evaluation of makeFlags, per @jtojnar's explanation:
NixOS#94892 (comment)
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue 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)
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue 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)
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue 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.
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue Oct 1, 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
dawidsowa added a commit to dawidsowa/nixpkgs that referenced this issue Oct 11, 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.
@toonn toonn marked this pull request as ready for review Oct 21, 2020
@toonn
Copy link
Contributor Author

@toonn toonn commented Oct 21, 2020

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

toonn added 8 commits Oct 22, 2020
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.
toonn and others added 7 commits Oct 22, 2020
x86_64-darwin is too specific because macOS runs on multiple
architectures.
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.
@jtojnar jtojnar force-pushed the font-joypixels-emoji branch from e6c9a23 to 5902a08 Oct 22, 2020
Copy link
Contributor

@jtojnar jtojnar left a comment

Seems to work for me, thanks.

@jtojnar jtojnar merged commit 03c6413 into NixOS:master Oct 22, 2020
16 checks passed
@doronbehar doronbehar mentioned this pull request Nov 15, 2020
10 tasks
doronbehar added a commit to doronbehar/nixpkgs that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants