From 444ac39ad3b55486c4584cc8512a911f7a3bfcd0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 13 Dec 2005 00:13:01 +0000 Subject: [PATCH] * Emacs 22.0.50 (CVS dump). svn path=/nixpkgs/trunk/; revision=4359 --- pkgs/applications/editors/emacs-22/builder.sh | 13 ++++++ pkgs/applications/editors/emacs-22/crt.patch | 41 +++++++++++++++++++ .../applications/editors/emacs-22/default.nix | 30 ++++++++++++++ .../editors/emacs-22/modes/cua/builder.sh | 4 ++ .../editors/emacs-22/modes/cua/default.nix | 8 ++++ .../editors/emacs-22/modes/haskell/builder.sh | 6 +++ .../emacs-22/modes/haskell/default.nix | 8 ++++ .../editors/emacs-22/modes/nxml/builder.sh | 7 ++++ .../editors/emacs-22/modes/nxml/default.nix | 8 ++++ pkgs/system/all-packages-generic.nix | 8 ++++ 10 files changed, 133 insertions(+) create mode 100644 pkgs/applications/editors/emacs-22/builder.sh create mode 100644 pkgs/applications/editors/emacs-22/crt.patch create mode 100644 pkgs/applications/editors/emacs-22/default.nix create mode 100644 pkgs/applications/editors/emacs-22/modes/cua/builder.sh create mode 100644 pkgs/applications/editors/emacs-22/modes/cua/default.nix create mode 100644 pkgs/applications/editors/emacs-22/modes/haskell/builder.sh create mode 100644 pkgs/applications/editors/emacs-22/modes/haskell/default.nix create mode 100644 pkgs/applications/editors/emacs-22/modes/nxml/builder.sh create mode 100644 pkgs/applications/editors/emacs-22/modes/nxml/default.nix diff --git a/pkgs/applications/editors/emacs-22/builder.sh b/pkgs/applications/editors/emacs-22/builder.sh new file mode 100644 index 000000000000..a59f4d45f4a7 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/builder.sh @@ -0,0 +1,13 @@ +source $stdenv/setup + +myglibc=`cat ${NIX_GCC}/nix-support/orig-glibc` +echo "glibc: $myglibc" + +postConfigure() { + cp $myglibc/lib/crt1.o src + cp $myglibc/lib/crti.o src + cp $myglibc/lib/crtn.o src +} +postConfigure=postConfigure + +genericBuild diff --git a/pkgs/applications/editors/emacs-22/crt.patch b/pkgs/applications/editors/emacs-22/crt.patch new file mode 100644 index 000000000000..93f17643a1af --- /dev/null +++ b/pkgs/applications/editors/emacs-22/crt.patch @@ -0,0 +1,41 @@ +Only in emacs-21.3: configure.in~ +Only in emacs-21.3: patchfile +Only in emacs-21.3/src: Makefile.in~ +diff -rc emacs-orig/src/s/gnu-linux.h emacs-21.3/src/s/gnu-linux.h +*** emacs-orig/src/s/gnu-linux.h 2001-09-28 17:50:04.000000000 +0200 +--- emacs-21.3/src/s/gnu-linux.h 2004-10-06 13:13:19.000000000 +0200 +*************** +*** 173,179 **** + /* GNU/Linux usually has crt0.o in a non-standard place */ + #define START_FILES pre-crt0.o /usr/lib/crt0.o + #else +! #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o + #endif + + #ifdef __ELF__ +--- 173,179 ---- + /* GNU/Linux usually has crt0.o in a non-standard place */ + #define START_FILES pre-crt0.o /usr/lib/crt0.o + #else +! #define START_FILES pre-crt0.o crt1.o crti.o + #endif + + #ifdef __ELF__ +*************** +*** 225,231 **** + #else + #undef LIB_GCC + #define LIB_GCC +! #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o + #endif + + /* Don't use -g in test compiles in configure. +--- 225,231 ---- + #else + #undef LIB_GCC + #define LIB_GCC +! #define LIB_STANDARD -lgcc -lc -lgcc crtn.o + #endif + + /* Don't use -g in test compiles in configure. +Only in emacs-21.3/src/s: gnu-linux.h~ diff --git a/pkgs/applications/editors/emacs-22/default.nix b/pkgs/applications/editors/emacs-22/default.nix new file mode 100644 index 000000000000..d2b47ca9ff9a --- /dev/null +++ b/pkgs/applications/editors/emacs-22/default.nix @@ -0,0 +1,30 @@ +{ xawSupport ? true +, xpmSupport ? true +, xaw3dSupport ? false +, gtkGUI ? false +, stdenv, fetchurl, x11, libXaw ? null, libXpm ? null, Xaw3d ? null +, pkgconfig ? null, gtk ? null +}: + +assert xawSupport -> libXaw != null; +assert xpmSupport -> libXpm != null; +assert xaw3dSupport -> Xaw3d != null; +assert gtkGUI -> pkgconfig != null && gtk != null; + +stdenv.mkDerivation { + name = "emacs-22.0.50-pre20051207"; + builder = ./builder.sh; + src = fetchurl { + url = http://losser.st-lab.cs.uu.nl/~eelco/dist/emacs-22.0.50.tar.bz2; + md5 = "011d40367015691e4319ddc65b4e7843"; + }; + patches = [./crt.patch]; + buildInputs = [ + x11 + (if xawSupport then libXaw else null) + (if xpmSupport then libXpm else null) + (if xaw3dSupport then Xaw3d else null) + ] ++ (if gtkGUI then [pkgconfig gtk] else []); + configureFlags = + if gtkGUI then ["--with-x-toolkit=gtk"] else []; +} diff --git a/pkgs/applications/editors/emacs-22/modes/cua/builder.sh b/pkgs/applications/editors/emacs-22/modes/cua/builder.sh new file mode 100644 index 000000000000..6f7bb428c1a6 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/cua/builder.sh @@ -0,0 +1,4 @@ +source $stdenv/setup + +mkdir -p $out/emacs/site-lisp +cp $src $out/emacs/site-lisp/cua.el diff --git a/pkgs/applications/editors/emacs-22/modes/cua/default.nix b/pkgs/applications/editors/emacs-22/modes/cua/default.nix new file mode 100644 index 000000000000..ddc2dca22326 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/cua/default.nix @@ -0,0 +1,8 @@ +{stdenv, fetchurl}: stdenv.mkDerivation { + name = "cua-mode-2.10"; + builder = ./builder.sh; + src = fetchurl { + url = http://nix.cs.uu.nl/dist/tarballs/cua-mode-2.10.el; + md5 = "5bf5e43f5f38c8383868c7c6c5baca09"; + }; +} diff --git a/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh b/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh new file mode 100644 index 000000000000..2d1540319944 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/haskell/builder.sh @@ -0,0 +1,6 @@ +source $stdenv/setup + +mkdir -p $out/emacs/site-lisp +tar zxvf $src +cp haskell-mode*/*.el $out/emacs/site-lisp +cp haskell-mode*/*.hs $out/emacs/site-lisp diff --git a/pkgs/applications/editors/emacs-22/modes/haskell/default.nix b/pkgs/applications/editors/emacs-22/modes/haskell/default.nix new file mode 100644 index 000000000000..644c485b947b --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/haskell/default.nix @@ -0,0 +1,8 @@ +{stdenv, fetchurl}: stdenv.mkDerivation { + name = "haskell-mode-1.45"; + builder = ./builder.sh; + src = fetchurl { + url = http://nix.cs.uu.nl/dist/tarballs/haskell-mode-1.45.tar.gz; + md5 = "c609998580cdb9ca8888c7d47d22ca3b"; + }; +} diff --git a/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh b/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh new file mode 100644 index 000000000000..d2393362ebb6 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/nxml/builder.sh @@ -0,0 +1,7 @@ +source $stdenv/setup + +mkdir -p $out/emacs/site-lisp +cd $out/emacs/site-lisp +tar xvfz $src +mv nxml-mode-*/* . +rmdir nxml-mode-* diff --git a/pkgs/applications/editors/emacs-22/modes/nxml/default.nix b/pkgs/applications/editors/emacs-22/modes/nxml/default.nix new file mode 100644 index 000000000000..57583bbfcb62 --- /dev/null +++ b/pkgs/applications/editors/emacs-22/modes/nxml/default.nix @@ -0,0 +1,8 @@ +{stdenv, fetchurl}: stdenv.mkDerivation { + name = "nxml-mode-20041004"; + builder = ./builder.sh; + src = fetchurl { + url = http://nix.cs.uu.nl/dist/tarballs/nxml-mode-20041004.tar.gz; + md5 = "ac137024cf337d6f11d8ab278d39b4db"; + }; +} diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index ed7077192190..205a37e515dd 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -1822,6 +1822,14 @@ rec { xaw3dSupport = false; }; + emacs22 = (import ../applications/editors/emacs-22) { + inherit fetchurl stdenv pkgconfig x11 Xaw3d; + inherit (xlibs) libXaw libXpm; + inherit (gtkLibs) gtk; + xaw3dSupport = false; + gtkGUI = true; + }; + nxml = (import ../applications/editors/emacs/modes/nxml) { inherit fetchurl stdenv; };