emacs24: fix build on darwin (clos #932)
This commit is contained in:
parent
5bfb4a4f30
commit
ad454f3511
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d
|
{ stdenv, fetchurl, ncurses, x11, libXaw, libXpm, Xaw3d
|
||||||
, pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
|
, pkgconfig, gtk, libXft, dbus, libpng, libjpeg, libungif
|
||||||
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
, libtiff, librsvg, texinfo, gconf, libxml2, imagemagick, gnutls
|
||||||
, alsaLib
|
, alsaLib, cairo
|
||||||
, withX ? true
|
, withX ? true
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -14,27 +14,31 @@ stdenv.mkDerivation rec {
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/emacs/${name}.tar.xz";
|
url = "mirror://gnu/emacs/${name}.tar.xz";
|
||||||
sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
|
sha256 = "1385qzs3bsa52s5rcncbrkxlydkw0ajzrvfxgv8rws5fx512kakh";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ]
|
[ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ]
|
||||||
++ stdenv.lib.optional stdenv.isLinux dbus
|
++ stdenv.lib.optional stdenv.isLinux dbus
|
||||||
++ stdenv.lib.optionals withX [
|
++ stdenv.lib.optionals withX
|
||||||
x11 libXaw Xaw3d libXpm libpng libjpeg libungif
|
[ x11 libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft
|
||||||
libtiff librsvg libXft imagemagick gtk
|
imagemagick gtk ]
|
||||||
];
|
++ stdenv.lib.optional stdenv.isDarwin cairo;
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
(if withX then
|
( if withX then
|
||||||
[ "--with-x-toolkit=gtk" "--with-xft"]
|
[ "--with-x-toolkit=gtk" "--with-xft"]
|
||||||
else
|
else
|
||||||
[ "--with-x=no --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no" ])
|
[ "--with-x=no" "--with-xpm=no" "--with-jpeg=no" "--with-png=no"
|
||||||
|
"--with-gif=no" "--with-tiff=no" ] )
|
||||||
# On NixOS, help Emacs find `crt*.o'.
|
# On NixOS, help Emacs find `crt*.o'.
|
||||||
++ stdenv.lib.optional (stdenv ? glibc)
|
++ stdenv.lib.optional (stdenv ? glibc)
|
||||||
[ "--with-crt-dir=${stdenv.glibc}/lib" ];
|
[ "--with-crt-dir=${stdenv.glibc}/lib" ];
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isDarwin && withX)
|
||||||
|
"-I${cairo}/include/cairo";
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cat >$out/share/emacs/site-lisp/site-start.el <<EOF
|
cat >$out/share/emacs/site-lisp/site-start.el <<EOF
|
||||||
;; nixos specific load-path
|
;; nixos specific load-path
|
||||||
|
@ -45,10 +49,16 @@ stdenv.mkDerivation rec {
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "GNU Emacs 24, the extensible, customizable text editor";
|
description = "GNU Emacs 24, the extensible, customizable text editor";
|
||||||
|
homepage = http://www.gnu.org/software/emacs/;
|
||||||
|
license = licenses.gplv3Plus;
|
||||||
|
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
GNU Emacs is an extensible, customizable text editor—and more. At its
|
GNU Emacs is an extensible, customizable text editor—and more. At its
|
||||||
|
@ -66,11 +76,5 @@ EOF
|
||||||
extensions are distributed with GNU Emacs; others are available
|
extensions are distributed with GNU Emacs; others are available
|
||||||
separately.
|
separately.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
homepage = "http://www.gnu.org/software/emacs/";
|
|
||||||
license = "GPLv3+";
|
|
||||||
|
|
||||||
maintainers = with maintainers; [ chaoflow lovek323 simons the-kenny ];
|
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7439,17 +7439,16 @@ let
|
||||||
# use override to enable additional features
|
# use override to enable additional features
|
||||||
libXaw = if stdenv.isDarwin then xlibs.libXaw else null;
|
libXaw = if stdenv.isDarwin then xlibs.libXaw else null;
|
||||||
Xaw3d = null;
|
Xaw3d = null;
|
||||||
gtk = if stdenv.isDarwin then null else gtk;
|
|
||||||
gconf = null;
|
gconf = null;
|
||||||
librsvg = null;
|
librsvg = null;
|
||||||
alsaLib = null;
|
alsaLib = null;
|
||||||
imagemagick = null;
|
imagemagick = null;
|
||||||
texinfo = texinfo5;
|
texinfo = texinfo5;
|
||||||
|
|
||||||
# use gccApple on darwin to deal with: unexec: 'my_edata is not in section
|
# use clangStdenv on darwin to deal with: unexec: 'my_edata is not in
|
||||||
# __data'
|
# section __data'
|
||||||
stdenv = if stdenv.isDarwin
|
stdenv = if stdenv.isDarwin
|
||||||
then stdenvAdapters.overrideGCC stdenv gccApple
|
then clangStdenv
|
||||||
else stdenv;
|
else stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue