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

freetype: disable patent-encumbered code by default #2020

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions pkgs/development/libraries/freetype/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
# Microsoft, so it is disabled by default. This option allows it to
# be enabled. See http://www.freetype.org/patents.html.
, useEncumberedCode ? false
, useInfinality ? true
, useInfinality ? false
}:

assert !(useEncumberedCode && useInfinality); # probably wouldn't make sense
# The Infinality patches enable patent-encumbered code in freetype. This
# assertion requires the user to acknowledge that they are enabling
# unredistributable patent-encumbered code. Of course, it is still possible to
# enable the encumbered code without using Infinality.
assert (!useInfinality || useEncumberedCode);

let

Expand Down Expand Up @@ -62,11 +66,12 @@ stdenv.mkDerivation rec {

passthru.infinality.useInfinality = useInfinality; # for fontconfig

meta = {
meta = with stdenv.lib; {
description = "A font rendering engine";
homepage = http://www.freetype.org/;
license = if useEncumberedCode then "unfree"
else "GPLv2+"; # or the FreeType License (BSD + advertising clause)
platforms = stdenv.lib.platforms.all;
license = if useEncumberedCode then licenses.unfree
else licenses.gpl2Plus; # or the FreeType License (BSD + advertising clause)
platforms = platforms.all;
maintainers = [ maintainers.ttuegel ];
};
}