parent
60cfc558be
commit
fafff78d3d
@ -1,12 +1,12 @@
|
|||||||
{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
|
{ stdenv, lib, fetchurl, ncurses, xlibsWrapper, libXaw, libXpm, Xaw3d
|
||||||
, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
, pkgconfig, gettext, libXft, dbus, libpng, libjpeg, libungif
|
||||||
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls
|
||||||
, alsaLib, cairo, acl, gpm, AppKit, CoreWLAN, Kerberos, GSS, ImageIO
|
, alsaLib, cairo, acl, gpm, AppKit, CoreWLAN, Kerberos, GSS, ImageIO
|
||||||
, autoconf, automake
|
|
||||||
, withX ? !stdenv.isDarwin
|
, withX ? !stdenv.isDarwin
|
||||||
|
, withGTK2 ? true, gtk2 ? null
|
||||||
, withGTK3 ? false, gtk3 ? null
|
, withGTK3 ? false, gtk3 ? null
|
||||||
, withXwidgets ? false, webkitgtk24x ? null, wrapGAppsHook ? null, glib_networking ? null
|
, withXwidgets ? false, webkitgtk24x ? null, wrapGAppsHook ? null, glib_networking ? null
|
||||||
, withGTK2 ? true, gtk2
|
, srcRepo ? false, autoconf ? null, automake ? null, texinfo ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert (libXft != null) -> libpng != null; # probably a bug
|
assert (libXft != null) -> libpng != null; # probably a bug
|
||||||
@ -19,32 +19,25 @@ assert withXwidgets -> withGTK3 && webkitgtk24x != null;
|
|||||||
|
|
||||||
let
|
let
|
||||||
toolkit =
|
toolkit =
|
||||||
if withGTK3 then "gtk3"
|
if withGTK2 then "gtk2"
|
||||||
else if withGTK2 then "gtk2"
|
else if withGTK3 then "gtk3"
|
||||||
else "lucid";
|
else "lucid";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "emacs-25.1";
|
name = "emacs-25.1";
|
||||||
|
|
||||||
builder = ./builder.sh;
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu//emacs/${name}.tar.xz";
|
url = "mirror://gnu//emacs/${name}.tar.xz";
|
||||||
sha256 = "0cwgyiyymnx4xdg99dm2drfxcyhy2jmyf0rkr9fwj9mwwf77kwhr";
|
sha256 = "0cwgyiyymnx4xdg99dm2drfxcyhy2jmyf0rkr9fwj9mwwf77kwhr";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals stdenv.isDarwin [
|
patches = lib.optional stdenv.isDarwin ./at-fdcwd.patch;
|
||||||
./at-fdcwd.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [ pkgconfig ]
|
||||||
substituteInPlace lisp/international/mule-cmds.el \
|
++ lib.optionals srcRepo [ autoconf automake texinfo ];
|
||||||
--replace "/usr/share/locale" "${gettext}/share/locale"
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo acl gpm gettext
|
[ ncurses gconf libxml2 gnutls alsaLib acl gpm gettext ]
|
||||||
autoconf automake ]
|
|
||||||
++ lib.optional stdenv.isLinux dbus
|
++ lib.optional stdenv.isLinux dbus
|
||||||
++ lib.optionals withX
|
++ lib.optionals withX
|
||||||
[ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
|
[ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
|
||||||
@ -67,11 +60,15 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-gif=no" "--with-tiff=no" ])
|
"--with-gif=no" "--with-tiff=no" ])
|
||||||
++ lib.optional withXwidgets "--with-xwidgets";
|
++ lib.optional withXwidgets "--with-xwidgets";
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && withX)
|
preConfigure = lib.optionalString srcRepo ''
|
||||||
"-I${cairo.dev}/include/cairo";
|
./autogen.sh
|
||||||
|
'' + ''
|
||||||
|
substituteInPlace lisp/international/mule-cmds.el \
|
||||||
|
--replace /usr/share/locale ${gettext}/share/locale
|
||||||
|
|
||||||
preBuild = ''
|
for makefile_in in $(find . -name Makefile.in -print); do
|
||||||
find . -name '*.elc' -delete
|
substituteInPlace $makefile_in --replace /bin/pwd pwd
|
||||||
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user