summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2013-08-14 15:02:07 +0200
committerEvgeny Egorochkin <phreedom@yandex.ru>2013-08-24 07:36:11 +0300
commita10812f7921d1f9aa4d0329ead7d861a79785141 (patch)
treec033130fc83613f561fe0e2e29846299033a5d52 /pkgs/applications/editors
parentb86b1b81f575415e9f6094313f8af2458484eccd (diff)
downloadnixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar.gz
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar.bz2
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar.lz
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar.xz
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.tar.zst
nixlib-a10812f7921d1f9aa4d0329ead7d861a79785141.zip
Add emacs24-nox: emacs built without X (or GTK) libraries.
This commit also fixes an issue where pkgconfig was only added as a
dependency when gtk support was enabled. This made ./configure unable
to find other libraries (libtiff, libxml2, gnutls, and others).
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/emacs-24/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix
index 0e4c9a14d20d..fbb7d7a4b160 100644
--- a/pkgs/applications/editors/emacs-24/default.nix
+++ b/pkgs/applications/editors/emacs-24/default.nix
@@ -2,9 +2,9 @@
 , pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
 , libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
 , alsaLib
+, withX ? true
 }:
 
-assert (gtk != null) -> (pkgconfig != null);
 assert (libXft != null) -> libpng != null;	# probably a bug
 assert stdenv.isDarwin -> libXaw != null;	# fails to link otherwise
 
@@ -19,14 +19,15 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs =
-    [ ncurses x11 texinfo libXaw Xaw3d libXpm libpng libjpeg libungif
-      libtiff librsvg libXft gconf libxml2 imagemagick gnutls alsaLib
-    ]
-    ++ stdenv.lib.optionals (gtk != null) [ gtk pkgconfig ]
-    ++ stdenv.lib.optional stdenv.isLinux dbus;
+    [ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ]
+    ++ stdenv.lib.optional stdenv.isLinux dbus
+    ++ stdenv.lib.optionals withX [
+         x11 libXaw Xaw3d libXpm libpng libjpeg libungif
+         libtiff librsvg libXft imagemagick gtk
+       ];
 
   configureFlags =
-    (if gtk != null then 
+    (if withX then 
       [ "--with-x-toolkit=gtk" "--with-xft"]
     else
       [ "--with-x-toolkit=no" ])
@@ -69,7 +70,7 @@ EOF
     homepage = "http://www.gnu.org/software/emacs/";
     license = "GPLv3+";
 
-    maintainers = with maintainers; [ chaoflow lovek323 simons ];
+    maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
     platforms = platforms.all;
   };
 }