diff options
Diffstat (limited to 'gnu/packages/emacs.scm')
| -rw-r--r-- | gnu/packages/emacs.scm | 99 |
1 files changed, 91 insertions, 8 deletions
diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 84e167d1fe2..d393e69c49b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> | 4 | ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> | 5 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
| 6 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> | 6 | ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> |
| 7 | ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> | ||
| 7 | ;;; | 8 | ;;; |
| 8 | ;;; This file is part of GNU Guix. | 9 | ;;; This file is part of GNU Guix. |
| 9 | ;;; | 10 | ;;; |
| @@ -52,6 +53,7 @@ | |||
| 52 | #:use-module (gnu packages glib) | 53 | #:use-module (gnu packages glib) |
| 53 | #:use-module (gnu packages acl) | 54 | #:use-module (gnu packages acl) |
| 54 | #:use-module (gnu packages perl) | 55 | #:use-module (gnu packages perl) |
| 56 | #:use-module (gnu packages pdf) | ||
| 55 | #:use-module (gnu packages linux) ;alsa | 57 | #:use-module (gnu packages linux) ;alsa |
| 56 | #:use-module (gnu packages xiph) | 58 | #:use-module (gnu packages xiph) |
| 57 | #:use-module (gnu packages mp3) | 59 | #:use-module (gnu packages mp3) |
| @@ -811,17 +813,98 @@ or XEmacs.") | |||
| 811 | (origin | 813 | (origin |
| 812 | (method url-fetch) | 814 | (method url-fetch) |
| 813 | (uri (string-append | 815 | (uri (string-append |
| 814 | "http://stable.melpa.org/packages/mmm-mode-" | 816 | "https://github.com/purcell/mmm-mode/archive/" |
| 815 | version | 817 | version ".tar.gz")) |
| 816 | ".tar")) | 818 | (file-name (string-append name "-" version ".tar.gz")) |
| 817 | (sha256 | 819 | (sha256 |
| 818 | (base32 | 820 | (base32 |
| 819 | "1llkzb6d978ym3zv3yfzwj0w5zzmmj3ksrm5swrx1papxcnqnkb9")))) | 821 | "10kwslnflbjqm62wkrq420crqzdqalzfflp9pqk1i12zm6dm4mfv")))) |
| 820 | (build-system emacs-build-system) | 822 | (build-system gnu-build-system) |
| 823 | (arguments | ||
| 824 | '(#:phases | ||
| 825 | (modify-phases %standard-phases | ||
| 826 | (add-after 'unpack 'autogen | ||
| 827 | (lambda _ | ||
| 828 | (zero? (system* "sh" "autogen.sh"))))))) | ||
| 829 | (native-inputs | ||
| 830 | `(("autoconf" ,autoconf) | ||
| 831 | ("automake" ,automake) | ||
| 832 | ("emacs" ,emacs-no-x) | ||
| 833 | ("texinfo" ,texinfo))) | ||
| 821 | (home-page "https://github.com/purcell/mmm-mode") | 834 | (home-page "https://github.com/purcell/mmm-mode") |
| 822 | (synopsis | 835 | (synopsis "Allow multiple major modes in an Emacs buffer") |
| 823 | "Allow multiple major modes in an Emacs buffer") | ||
| 824 | (description | 836 | (description |
| 825 | "MMM Mode is a minor mode that allows multiple major modes to coexist in a | 837 | "MMM Mode is a minor mode that allows multiple major modes to coexist in a |
| 826 | single buffer.") | 838 | single buffer.") |
| 827 | (license license:gpl3+))) | 839 | (license license:gpl3+))) |
| 840 | |||
| 841 | (define-public emacs-pdf-tools | ||
| 842 | (package | ||
| 843 | (name "emacs-pdf-tools") | ||
| 844 | (version "0.60") | ||
| 845 | (source (origin | ||
| 846 | (method url-fetch) | ||
| 847 | (uri (string-append | ||
| 848 | "https://github.com/politza/pdf-tools/archive/v" | ||
| 849 | version ".tar.gz")) | ||
| 850 | (file-name (string-append name "-" version ".tar.gz")) | ||
| 851 | (sha256 | ||
| 852 | (base32 | ||
| 853 | "1y8k5n2jbyaxby0j6f4m9xbm0ddpmbkrfj6rp6ll5sb97lcg3vrx")))) | ||
| 854 | (build-system gnu-build-system) | ||
| 855 | (arguments | ||
| 856 | `(#:tests? #f ; there are no tests | ||
| 857 | #:modules ((guix build gnu-build-system) | ||
| 858 | (guix build utils) | ||
| 859 | (guix build emacs-utils)) | ||
| 860 | #:imported-modules (,@%gnu-build-system-modules | ||
| 861 | (guix build emacs-utils)) | ||
| 862 | #:phases | ||
| 863 | (modify-phases %standard-phases | ||
| 864 | (add-after 'unpack 'enter-dir (lambda _ (chdir "server") #t)) | ||
| 865 | (add-before | ||
| 866 | 'configure 'autogen | ||
| 867 | (lambda _ | ||
| 868 | (zero? (system* "bash" "autogen.sh")))) | ||
| 869 | (add-before | ||
| 870 | 'build 'patch-variables | ||
| 871 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 872 | (with-directory-excursion "../lisp" | ||
| 873 | ;; Set path to epdfinfo program. | ||
| 874 | (emacs-substitute-variables "pdf-info.el" | ||
| 875 | ("pdf-info-epdfinfo-program" | ||
| 876 | (string-append (assoc-ref outputs "out") | ||
| 877 | "/bin/epdfinfo"))) | ||
| 878 | ;; Set 'pdf-tools-handle-upgrades' to nil to avoid "auto | ||
| 879 | ;; upgrading" that pdf-tools tries to perform. | ||
| 880 | (emacs-substitute-variables "pdf-tools.el" | ||
| 881 | ("pdf-tools-handle-upgrades" '()))))) | ||
| 882 | (add-after | ||
| 883 | 'install 'install-lisp | ||
| 884 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 885 | (let ((target (string-append (assoc-ref outputs "out") | ||
| 886 | "/share/emacs/site-lisp/"))) | ||
| 887 | (mkdir-p target) | ||
| 888 | (for-each | ||
| 889 | (lambda (file) | ||
| 890 | (copy-file file (string-append target (basename file)))) | ||
| 891 | (find-files "../lisp" "^(pdf|tab).*\\.elc?")) | ||
| 892 | (emacs-byte-compile-directory target) | ||
| 893 | (emacs-generate-autoloads "pdf-tools" target))))))) | ||
| 894 | (native-inputs `(("autoconf" ,autoconf) | ||
| 895 | ("automake" ,automake) | ||
| 896 | ("pkg-config" ,pkg-config) | ||
| 897 | ("emacs" ,emacs-no-x))) | ||
| 898 | (inputs `(("poppler" ,poppler) | ||
| 899 | ("cairo" ,cairo) | ||
| 900 | ("glib" ,glib) | ||
| 901 | ("libpng" ,libpng) | ||
| 902 | ("zlib" ,zlib))) | ||
| 903 | (synopsis "Emacs support library for PDF files") | ||
| 904 | (description | ||
| 905 | "PDF Tools is, among other things, a replacement of DocView for PDF | ||
| 906 | files. The key difference is that pages are not pre-rendered by | ||
| 907 | e.g. ghostscript and stored in the file-system, but rather created on-demand | ||
| 908 | and stored in memory.") | ||
| 909 | (home-page "https://github.com/politza/pdf-tools") | ||
| 910 | (license license:gpl3+))) | ||
