mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
* Bring back Emacs 22 by request from Ludovic.
svn path=/nixpkgs/trunk/; revision=18529
This commit is contained in:
parent
132a1db1ee
commit
11c3e92738
27
pkgs/applications/editors/emacs-22/builder.sh
Normal file
27
pkgs/applications/editors/emacs-22/builder.sh
Normal file
@ -0,0 +1,27 @@
|
||||
source $stdenv/setup
|
||||
|
||||
preConfigure() {
|
||||
libc=$(cat ${NIX_GCC}/nix-support/orig-libc)
|
||||
echo "libc: $libc"
|
||||
|
||||
case "${system}" in
|
||||
x86_64-*) glibclibdir=lib64 ;;
|
||||
*) glibclibdir=lib ;;
|
||||
esac
|
||||
|
||||
for i in src/s/*.h src/m/*.h; do
|
||||
substituteInPlace $i \
|
||||
--replace /usr/${glibclibdir}/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/${glibclibdir}/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/${glibclibdir}/crtn.o $libc/${glibclibdir}/crtn.o \
|
||||
--replace /usr/lib/crt1.o $libc/${glibclibdir}/crt1.o \
|
||||
--replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
|
||||
done
|
||||
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
48
pkgs/applications/editors/emacs-22/default.nix
Normal file
48
pkgs/applications/editors/emacs-22/default.nix
Normal file
@ -0,0 +1,48 @@
|
||||
{ xawSupport ? true
|
||||
, xpmSupport ? true
|
||||
, xaw3dSupport ? false
|
||||
, gtkGUI ? false
|
||||
, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null
|
||||
, pkgconfig ? null, gtk ? null
|
||||
, ncurses
|
||||
}:
|
||||
|
||||
assert xawSupport && !xaw3dSupport -> libXaw != null;
|
||||
assert xawSupport && xaw3dSupport -> Xaw3d != null;
|
||||
assert xpmSupport -> libXpm != null;
|
||||
assert gtkGUI -> pkgconfig != null && gtk != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "emacs-22.3";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/emacs/${name}.tar.gz";
|
||||
sha256 = "05hd89bchcpwzcx5la0alcp0wb7xywvnf98dxrshrqlfvccvgnbv";
|
||||
};
|
||||
|
||||
buildInputs = [ncurses x11]
|
||||
++ stdenv.lib.optional xawSupport (if xaw3dSupport then Xaw3d else libXaw)
|
||||
++ stdenv.lib.optional xpmSupport libXpm
|
||||
++ stdenv.lib.optionals gtkGUI [pkgconfig gtk];
|
||||
|
||||
configureFlags =
|
||||
stdenv.lib.optional gtkGUI "--with-x-toolkit=gtk";
|
||||
|
||||
meta = {
|
||||
description = "GNU Emacs, *the* text editor";
|
||||
|
||||
longDescription = ''
|
||||
GNU Emacs is an extensible, customizable text editor—and more.
|
||||
At its core is an interpreter for Emacs Lisp, a dialect of the
|
||||
Lisp programming language with extensions to support text
|
||||
editing.
|
||||
'';
|
||||
|
||||
homepage = http://www.gnu.org/software/emacs/;
|
||||
license = "GPLv3+";
|
||||
|
||||
platforms = stdenv.lib.platforms.linux; # GTK & co. are needed.
|
||||
};
|
||||
}
|
@ -22,6 +22,7 @@ rec {
|
||||
then attrByPath (tail attrPath) default (getAttr attr e)
|
||||
else default;
|
||||
|
||||
|
||||
/* Return nested attribute set in which an attribute is set. For instance
|
||||
["x" "y"] applied with some value v returns `x.y = v;' */
|
||||
setAttrByPath = attrPath: value:
|
||||
|
@ -6489,6 +6489,14 @@ let
|
||||
|
||||
emacs = emacs23;
|
||||
|
||||
emacs22 = import ../applications/editors/emacs-22 {
|
||||
inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d;
|
||||
inherit (xlibs) libXaw libXpm;
|
||||
inherit (gtkLibs) gtk;
|
||||
xaw3dSupport = getPkgConfig "emacs" "xaw3dSupport" false;
|
||||
gtkGUI = getPkgConfig "emacs" "gtkSupport" true;
|
||||
};
|
||||
|
||||
emacs23 = import ../applications/editors/emacs-23 {
|
||||
inherit fetchurl stdenv ncurses pkgconfig x11 Xaw3d
|
||||
libpng libjpeg libungif libtiff texinfo dbus;
|
||||
@ -6582,6 +6590,7 @@ let
|
||||
};
|
||||
});
|
||||
|
||||
emacs22Packages = emacsPackages emacs22;
|
||||
emacs23Packages = emacsPackages emacs23;
|
||||
|
||||
evince = makeOverridable (import ../applications/misc/evince) {
|
||||
|
@ -146,6 +146,7 @@ in {
|
||||
e2fsprogs = linux;
|
||||
ejabberd = linux;
|
||||
elinks = linux;
|
||||
emacs22 = gtkSupported;
|
||||
emacs23 = gtkSupported;
|
||||
enscript = all;
|
||||
eprover = linux;
|
||||
@ -435,13 +436,16 @@ in {
|
||||
tools = linux;
|
||||
};
|
||||
|
||||
emacs23Packages = {
|
||||
emacs22Packages = {
|
||||
bbdb = linux;
|
||||
cedet = linux;
|
||||
ecb = linux;
|
||||
emacsw3m = linux;
|
||||
emms = linux;
|
||||
nxml = all;
|
||||
};
|
||||
|
||||
emacs23Packages = emacs22Packages // {
|
||||
jdee = linux;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user