summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorMathijs Kwik <mathijs@bluescreen303.nl>2012-08-17 08:55:47 +0200
committerMathijs Kwik <mathijs@bluescreen303.nl>2012-08-17 08:55:47 +0200
commit5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd (patch)
tree175adf9add3241b235b1233866183c676f530042 /pkgs/applications/editors
parentf27f8a11776840fe32c1042cbe27ee3c21dced12 (diff)
downloadnixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar.gz
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar.bz2
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar.lz
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar.xz
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.tar.zst
nixpkgs-5a146e9cff0b7bf9a42392f386474cd0d7f8d4cd.zip
emacs: add "color-theme"
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/emacs-modes/color-theme/default.nix26
-rw-r--r--pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch19
-rw-r--r--pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff28
3 files changed, 73 insertions, 0 deletions
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 ()