Skip to content

Commit

Permalink
fontforge: introduce withGUI option
Browse files Browse the repository at this point in the history
It was unintuitive that the withGTK option controlled whether a
fontforge GUI was enabled at all, since fontforge supports multiple
GUIs (a GTK one and an X11 one -- confusingly the X11 one still
requires GTK).

With the new withGUI option, it is possible to build the X11 GUI by
setting withGTK to false and withGUI to true.  I haven't added an
attribute for this configuration because I expect it to be pretty
obsure -- my rationale for adding this option was code clarity rather
than utility.
  • Loading branch information
alyssais committed Jun 6, 2020
1 parent e9848d1 commit 8a74399
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkgs/tools/misc/fontforge/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
, readline, woff2, zeromq, libuninameslist
, withSpiro ? false, libspiro
, withGTK ? false, gtk3
, withGUI ? withGTK
, withPython ? true
, withExtras ? true
, Carbon ? null, Cocoa ? null
}:

assert withGTK -> withGUI;

stdenv.mkDerivation rec {
pname = "fontforge";
version = "20200314";
Expand Down Expand Up @@ -36,12 +39,13 @@ stdenv.mkDerivation rec {
python freetype zlib glib libungif libpng libjpeg libtiff libxml2
]
++ lib.optionals withSpiro [libspiro]
++ lib.optionals withGTK [ gtk3 cairo pango ]
++ lib.optionals withGUI [ gtk3 cairo pango ]
++ lib.optionals stdenv.isDarwin [ Carbon Cocoa ];

cmakeFlags = [ "-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON" ]
++ lib.optional (!withSpiro) "-DENABLE_LIBSPIRO=OFF"
++ lib.optional (!withGTK) "-DENABLE_GUI=OFF"
++ lib.optional (!withGUI) "-DENABLE_GUI=OFF"
++ lib.optional (!withGTK) "-DENABLE_X11=ON"
++ lib.optional withExtras "-DENABLE_FONTFORGE_EXTRAS=ON";

# work-around: git isn't really used, but configuration fails without it
Expand Down

0 comments on commit 8a74399

Please sign in to comment.