diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-06-06 00:03:38 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-06-06 04:51:20 +0000 |
commit | 8a74399de3c1f78061ba08ddab1606b0a91fc689 (patch) | |
tree | 8bb2c574ccc62ed09056c6127fe12d27c1a62ba6 /pkgs/tools/misc/fontforge | |
parent | e9848d11ad038d4077948f14986496ccb14e11bc (diff) |
fontforge: introduce withGUI option
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.
Diffstat (limited to 'pkgs/tools/misc/fontforge')
-rw-r--r-- | pkgs/tools/misc/fontforge/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index ed5c242e62418..82fd5c8210dd3 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -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"; @@ -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 |