diff --git a/pkgs/applications/editors/emacs-modes/color-theme/default.nix b/pkgs/applications/editors/emacs-modes/color-theme/default.nix new file mode 100644 index 00000000000..9cc0e7fd42b --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/color-theme/default.nix @@ -0,0 +1,26 @@ +{stdenv, fetchurl, emacs}: + +stdenv.mkDerivation rec { + name = "color-theme-6.6.0"; + + src = fetchurl { + url = "http://download.savannah.gnu.org/releases/color-theme/${name}.tar.gz"; + sha256 = "0yx1ghcjc66s1rl0v3d4r1k88ifw591hf814ly3d73acvh15zlsn"; + }; + + # patches from http://aur.archlinux.org/packages.php?ID=54883 + patches = [ ./fix-build.patch ./gnus-bug.diff ]; + + buildInputs = [ emacs ]; + + installFlags = [ "ELISPDIR=$(out)/share/emacs/site-lisp" ]; + installTargets = "install-bin"; + + meta = { + description = "An emacs-lisp mode for skinning your emacs."; + homepage = http://www.nongnu.org/color-theme; + license = "GPLv2+"; + + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch b/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch new file mode 100644 index 00000000000..cfc237c8cdc --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch @@ -0,0 +1,19 @@ +--- a/Makefile 2009-05-15 18:22:49.000000000 +0200 ++++ b/Makefile 2009-05-16 08:59:36.000000000 +0200 +@@ -15,6 +15,7 @@ + TARGET = $(patsubst %.el,%.elc,$(SPECIAL) $(SOURCE)) + MANUAL = color-theme + MISC = AUTHORS COPYING ChangeLog Makefile.defs Makefile $(AUTOLOADFILE).in ++LOADPATH = "$(shell pwd)" "$(shell pwd)/themes" + #AUTHORS CREDITS HISTORY NEWS README Makefile ChangeLog \ + #ChangeLog.2005 ChangeLog.2004 ChangeLog.2003 ChangeLog.2002 \ + #ChangeLog.2001 servers.pl color-theme-auto.in color-theme.texi +@@ -47,7 +48,7 @@ + + %.elc: %.el + @$(EMACS) $(OPTIONCOMPILE) \ +- --eval '(setq load-path (cons "." load-path))' \ ++ --eval '(setq load-path (append load-path (list $(LOADPATH))))' \ + -f batch-byte-compile $< + + %.info: %.texi diff --git a/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff b/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff new file mode 100644 index 00000000000..9d227df562e --- /dev/null +++ b/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff @@ -0,0 +1,28 @@ +diff -Naur color-theme-6.6.0.orig/color-theme.el color-theme-6.6.0.new/color-theme.el +--- color-theme-6.6.0.orig/color-theme.el 2011-11-18 01:17:29.000000000 +0100 ++++ color-theme-6.6.0.new/color-theme.el 2011-11-18 01:24:07.000000000 +0100 +@@ -73,9 +73,10 @@ + "Non-nil if running XEmacs.") + + ;; Add this since it appears to miss in emacs-2x +-(or (fboundp 'replace-in-string) +- (defun replace-in-string (target old new) +- (replace-regexp-in-string old new target))) ++(if (fboundp 'replace-in-string) ++ (defalias 'color-theme-replace-in-string 'replace-in-string) ++ (defsubst color-theme-replace-in-string (target old new &optional literal) ++ (replace-regexp-in-string old new target nil literal))) + + ;; face-attr-construct has a problem in Emacs 20.7 and older when + ;; dealing with inverse-video faces. Here is a short test to check +@@ -1626,8 +1627,8 @@ + (add-to-list 'color-themes + (list ',n + (upcase-initials +- (replace-in-string +- (replace-in-string ++ (color-theme-replace-in-string ++ (color-theme-replace-in-string + (symbol-name ',n) "^color-theme-" "") "-" " ")) + ,author)) + (defun ,n () diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d47fe294e22..d703732f967 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6674,6 +6674,8 @@ let coffee = callPackage ../applications/editors/emacs-modes/coffee { }; + colorTheme = callPackage ../applications/editors/emacs-modes/color-theme { }; + cua = callPackage ../applications/editors/emacs-modes/cua { }; ecb = callPackage ../applications/editors/emacs-modes/ecb { };