Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 3.26 KB | None | 0 0
  1. (define-public emacs-git
  2.   (let ((commit "d57bb0c323c326518d9cc974dc794f9e23a51917")
  3.         (revision "0"))
  4.     (package (inherit emacs)
  5.       (name "emacs-git")
  6.       (version (git-version "27" revision commit))
  7.       (source (origin
  8.                 (method git-fetch)
  9.                 (uri (git-reference
  10.                        (url "https://git.savannah.gnu.org/git/emacs.git")
  11.                        (commit commit)
  12.                        (recursive? #t)))
  13.                 (file-name (git-file-name name version))
  14.                 (patches (search-patches ;; "emacs-exec-path.patch"
  15.                            "emacs-fix-scheme-indent-function.patch"
  16.                            "emacs-source-date-epoch.patch"))
  17.                 (sha256
  18.                   (base32 "0biv77p80kc1fwyc3fsi2343na6x9xp0pw9q6fv3vggna7rvwlbi"))
  19.                 (modules (origin-modules (package-source emacs)))
  20.                 (snippet
  21.                   ;; Delete the bundled byte-compiled elisp files and
  22.                   ;; generated autoloads.
  23.                   '(with-directory-excursion "lisp"
  24.                     (for-each delete-file
  25.                               (append (find-files "." "\\.elc$")
  26.                                       (find-files "." "loaddefs\\.el$")))
  27.  
  28.                     ;; Make sure Tramp looks for binaries in the right places on
  29.                     ;; remote Guix System machines, where 'getconf PATH' returns
  30.                     ;; something bogus.
  31.                     (substitute* "net/tramp-sh.el"
  32.                                  ;; Patch the line after "(defcustom tramp-remote-path".
  33.                                  (("\\(tramp-default-remote-path")
  34.                                   (format #f "(tramp-default-remote-path ~s ~s ~s ~s "
  35.                                           "~/.guix-profile/bin" "~/.guix-profile/sbin"
  36.                                           "/run/current-system/profile/bin"
  37.                                           "/run/current-system/profile/sbin")))
  38.  
  39.                     ;; Make sure Man looks for C header files in the right
  40.                     ;; places.
  41.                     (substitute* "man.el"
  42.                       (("\"/usr/local/include\"" line)
  43.                        (string-join
  44.                          (list line
  45.                                "\"~/.guix-profile/include\""
  46.                                "\"/var/guix/profiles/system/profile/include\"")
  47.                          " ")))
  48.                     #t))))
  49.       (arguments
  50.         (substitute-keyword-arguments (package-arguments emacs)
  51.           ((#:configure-flags cf)
  52.            `(append ,cf '("--with-cairo" "--enable-link-time-optimization")))
  53.           ((#:phases phases)
  54.            `(modify-phases ,phases
  55.              (add-before 'reset-gzip-timestamps 'make-compressed-files-writable
  56.                          (lambda _
  57.                            (for-each make-file-writable
  58.                                      (find-files %output ".*\\.t?gz$"))
  59.                            #t))))))
  60.       (inputs
  61.         `(("jansson" ,jansson)
  62.           ,@(package-inputs emacs)))
  63.       (native-inputs
  64.         `(("autoconf" ,autoconf)
  65.           ("perl" ,perl)
  66.           ("python" ,python-3)
  67.           ("rc" ,rc)
  68.           ,@(package-native-inputs emacs))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement