From 658c2de1b74f82995e3a08c826ca6da6d3ffc336 Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Fri, 15 Jul 2016 16:18:23 +0300 Subject: [PATCH 1/2] emacs25pre: Add option for building with xwidgets --- pkgs/applications/editors/emacs-25/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/emacs-25/default.nix b/pkgs/applications/editors/emacs-25/default.nix index e3e5f60dd00..ad1559cbb51 100644 --- a/pkgs/applications/editors/emacs-25/default.nix +++ b/pkgs/applications/editors/emacs-25/default.nix @@ -5,6 +5,7 @@ , autoconf, automake , withX ? !stdenv.isDarwin , withGTK3 ? false, gtk3 ? null +, withXwidgets ? false, webkitgtk24x ? null , withGTK2 ? true, gtk2 }: @@ -14,6 +15,7 @@ assert withGTK2 -> withX || stdenv.isDarwin; assert withGTK3 -> withX || stdenv.isDarwin; assert withGTK2 -> !withGTK3 && gtk2 != null; assert withGTK3 -> !withGTK2 && gtk3 != null; +assert withXwidgets -> withGTK3 && webkitgtk24x != null; let toolkit = @@ -49,17 +51,19 @@ stdenv.mkDerivation rec { imagemagick gconf ] ++ stdenv.lib.optional (withX && withGTK2) gtk2 ++ stdenv.lib.optional (withX && withGTK3) gtk3 - ++ stdenv.lib.optional (stdenv.isDarwin && withX) cairo; + ++ stdenv.lib.optional (stdenv.isDarwin && withX) cairo + ++ stdenv.lib.optional withXwidgets webkitgtk24x; propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ]; configureFlags = - if stdenv.isDarwin + (if stdenv.isDarwin then [ "--with-ns" "--disable-ns-self-contained" ] else if withX then [ "--with-x-toolkit=${toolkit}" "--with-xft" ] else [ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no" - "--with-gif=no" "--with-tiff=no" ]; + "--with-gif=no" "--with-tiff=no" ]) + ++ stdenv.lib.optional withXwidgets "--with-xwidgets"; NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX) "-I${cairo.dev}/include/cairo"; From 9edcfa8908f09b86a65a1136f481d23d015db49d Mon Sep 17 00:00:00 2001 From: Alexey Lebedeff Date: Fri, 15 Jul 2016 17:16:24 +0300 Subject: [PATCH 2/2] emacs25pre: Fix https for xwidgets-browse-url --- pkgs/applications/editors/emacs-25/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs-25/default.nix b/pkgs/applications/editors/emacs-25/default.nix index ad1559cbb51..a33cd570550 100644 --- a/pkgs/applications/editors/emacs-25/default.nix +++ b/pkgs/applications/editors/emacs-25/default.nix @@ -5,7 +5,7 @@ , autoconf, automake , withX ? !stdenv.isDarwin , withGTK3 ? false, gtk3 ? null -, withXwidgets ? false, webkitgtk24x ? null +, withXwidgets ? false, webkitgtk24x ? null, wrapGAppsHook ? null, glib_networking ? null , withGTK2 ? true, gtk2 }: @@ -52,7 +52,7 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional (withX && withGTK2) gtk2 ++ stdenv.lib.optional (withX && withGTK3) gtk3 ++ stdenv.lib.optional (stdenv.isDarwin && withX) cairo - ++ stdenv.lib.optional withXwidgets webkitgtk24x; + ++ stdenv.lib.optionals withXwidgets [webkitgtk24x wrapGAppsHook glib_networking]; propagatedBuildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit GSS ImageIO ];