2005-12-22 11:49:43 +01:00
|
|
|
{ xawSupport ? true
|
|
|
|
, xpmSupport ? true
|
2009-02-23 17:06:59 +01:00
|
|
|
, dbusSupport ? true
|
2005-12-22 11:49:43 +01:00
|
|
|
, xaw3dSupport ? false
|
|
|
|
, gtkGUI ? false
|
|
|
|
, xftSupport ? false
|
2009-02-17 22:05:52 +01:00
|
|
|
, stdenv, fetchcvs, ncurses, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
|
2009-02-23 17:06:59 +01:00
|
|
|
, pkgconfig ? null, gtk ? null, libXft ? null, dbus ? null
|
2009-02-06 09:43:31 +01:00
|
|
|
, libpng, libjpeg, libungif, libtiff, texinfo
|
2009-02-17 22:05:52 +01:00
|
|
|
, autoconf, automake
|
2005-12-22 11:49:43 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert xawSupport -> libXaw != null;
|
|
|
|
assert xpmSupport -> libXpm != null;
|
2009-02-23 17:06:59 +01:00
|
|
|
assert dbusSupport -> dbus != null;
|
2005-12-22 11:49:43 +01:00
|
|
|
assert xaw3dSupport -> Xaw3d != null;
|
|
|
|
assert gtkGUI -> pkgconfig != null && gtk != null;
|
|
|
|
assert xftSupport -> libXft != null && libpng != null; # libpng = probably a bug
|
|
|
|
|
2009-06-28 01:00:32 +02:00
|
|
|
let date = "2009-06-26"; in
|
2005-12-22 11:49:43 +01:00
|
|
|
stdenv.mkDerivation {
|
2009-02-06 09:43:31 +01:00
|
|
|
name = "emacs-snapshot-23-${date}";
|
2007-10-24 18:21:41 +02:00
|
|
|
|
2005-12-22 11:49:43 +01:00
|
|
|
builder = ./builder.sh;
|
2007-10-24 18:21:41 +02:00
|
|
|
|
2009-02-17 22:05:52 +01:00
|
|
|
src = fetchcvs {
|
|
|
|
inherit date;
|
|
|
|
cvsRoot = ":pserver:anonymous@cvs.savannah.gnu.org:/sources/emacs";
|
|
|
|
module = "emacs";
|
2009-06-28 01:00:32 +02:00
|
|
|
sha256 = "bf9b21a0634f45474a1ce91e6153ced69194f1e9c0acd6626a931198f4a5972f";
|
2005-12-22 11:49:43 +01:00
|
|
|
};
|
2007-10-24 18:21:41 +02:00
|
|
|
|
2009-02-17 22:05:52 +01:00
|
|
|
preConfigure = "autoreconf -vfi";
|
2007-10-24 18:21:41 +02:00
|
|
|
|
2005-12-22 11:49:43 +01:00
|
|
|
buildInputs = [
|
2009-02-17 22:05:52 +01:00
|
|
|
autoconf automake
|
2009-02-06 09:43:31 +01:00
|
|
|
ncurses x11 texinfo
|
2005-12-22 11:49:43 +01:00
|
|
|
(if xawSupport then libXaw else null)
|
|
|
|
(if xpmSupport then libXpm else null)
|
2009-02-23 17:06:59 +01:00
|
|
|
(if dbusSupport then dbus else null)
|
2005-12-22 11:49:43 +01:00
|
|
|
(if xaw3dSupport then Xaw3d else null)
|
2007-10-24 18:21:41 +02:00
|
|
|
libpng libjpeg libungif libtiff # maybe not strictly required?
|
2005-12-22 11:49:43 +01:00
|
|
|
]
|
|
|
|
++ (if gtkGUI then [pkgconfig gtk] else [])
|
2007-10-24 18:21:41 +02:00
|
|
|
++ (if xftSupport then [libXft] else []);
|
|
|
|
|
2007-02-05 15:55:15 +01:00
|
|
|
configureFlags = "
|
2009-02-06 09:43:31 +01:00
|
|
|
${if gtkGUI then "--with-x-toolkit=gtk --enable-font-backend --with-xft" else ""}
|
2007-02-05 15:55:15 +01:00
|
|
|
";
|
2007-02-05 15:58:17 +01:00
|
|
|
|
2012-01-03 21:58:57 +01:00
|
|
|
postInstall = ''
|
|
|
|
cat >$out/share/emacs/site-lisp/site-start.el <<EOF
|
|
|
|
;; nixos specific load-path
|
2012-01-04 06:48:38 +01:00
|
|
|
(when (getenv "NIX_PROFILES") (setq load-path
|
|
|
|
(append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
|
|
|
|
(split-string (getenv "NIX_PROFILES"))))
|
|
|
|
load-path)))
|
2012-01-03 21:58:57 +01:00
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2007-02-05 15:58:17 +01:00
|
|
|
meta = {
|
2009-02-23 17:06:59 +01:00
|
|
|
description = "GNU Emacs with Unicode, GTK and Xft support (23.x alpha)";
|
2007-09-11 13:15:37 +02:00
|
|
|
homepage = http://www.emacswiki.org/cgi-bin/wiki/XftGnuEmacs;
|
2009-02-06 09:43:31 +01:00
|
|
|
license = "GPLv3+";
|
2009-09-17 11:52:11 +02:00
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
2009-09-17 12:26:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux; # GTK & co. are needed.
|
2007-02-05 15:58:17 +01:00
|
|
|
};
|
2005-12-22 11:49:43 +01:00
|
|
|
}
|