From 6dc2d9645cac7b7e4fc0110615c13dc483aad5ff Mon Sep 17 00:00:00 2001
From: adisbladis <adisbladis@gmail.com>
Date: Sun, 18 Aug 2019 17:02:35 +0100
Subject: [PATCH] emacs-packages: Remove color-theme from old emacs package
 infrastructure

---
 .../emacs-modes/color-theme/default.nix       | 26 -----------------
 .../emacs-modes/color-theme/fix-build.patch   | 19 -------------
 .../emacs-modes/color-theme/gnus-bug.diff     | 28 -------------------
 3 files changed, 73 deletions(-)
 delete mode 100644 pkgs/applications/editors/emacs-modes/color-theme/default.nix
 delete mode 100644 pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch
 delete mode 100644 pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff

diff --git a/pkgs/applications/editors/emacs-modes/color-theme/default.nix b/pkgs/applications/editors/emacs-modes/color-theme/default.nix
deleted file mode 100644
index 407b9e58f0b..00000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{stdenv, fetchurl, emacs}:
-
-stdenv.mkDerivation rec {
-  name = "color-theme-6.6.0";
-
-  src = fetchurl {
-    url = "mirror://savannah/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 = "Emacs-lisp mode for skinning your Emacs";
-    homepage = https://www.nongnu.org/color-theme;
-    license = stdenv.lib.licenses.gpl2Plus;
-
-    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
deleted file mode 100644
index cfc237c8cdc..00000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/fix-build.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- 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
deleted file mode 100644
index 9d227df562e..00000000000
--- a/pkgs/applications/editors/emacs-modes/color-theme/gnus-bug.diff
+++ /dev/null
@@ -1,28 +0,0 @@
-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 ()