gnu: emacs-magit: Update to 3.0.0.

* gnu/packages/emacs-xyz.scm (emacs-magit): Update to 3.0.0.
[arguments]<#:phases>: Don’t return #t, this will be redundant once the
core-updates branch has been merged.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Xinglu Chen 2021-05-25 13:26:45 +02:00 committed by Nicolas Goaziou
parent 93a5505f12
commit a5c9843cfe
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -656,92 +656,84 @@ (define-public emacs-libgit
(license license:gpl3+)))) (license license:gpl3+))))
(define-public emacs-magit (define-public emacs-magit
;; There hasn't been an official release since 2018-11-16. (package
(let ((commit "7f486d47fe7042edba8d9a855a4c2c301a30bc6b") (name "emacs-magit")
(revision "6")) (version "3.0.0")
(package (source
(name "emacs-magit") (origin
(version (git-version "2.90.1" revision commit)) (method git-fetch)
(source (uri (git-reference
(origin (url "https://github.com/magit/magit")
(method git-fetch) (commit (string-append "v" version))))
(uri (git-reference (file-name (git-file-name name version))
(url "https://github.com/magit/magit") (sha256
(commit commit))) (base32 "0dbp3gx43ipxv8zg9m0hfhksz85rnkikaq35rx705qqz6xq6xq9m"))))
(file-name (git-file-name name version)) (build-system emacs-build-system)
(sha256 (arguments
(base32 "05kyc5y5wa1p3h8j7mbgvfc4zcj998zi26lnnmksj9wnvahzxfms")))) `(#:emacs ,emacs-no-x ;module support is required
(build-system emacs-build-system) #:tests? #t
(arguments #:test-command '("make" "test")
`(#:emacs ,emacs-no-x ;module support is required #:phases
#:tests? #t (modify-phases %standard-phases
#:test-command '("make" "test") (add-after 'unpack 'build-info-manual
#:phases (lambda _
(modify-phases %standard-phases (invoke "make" "info")
(add-after 'unpack 'build-info-manual ;; Copy info files to the lisp directory, which acts as
(lambda _ ;; the root of the project for the emacs-build-system.
(invoke "make" "info") (for-each (lambda (f)
;; Copy info files to the lisp directory, which acts as (install-file f "lisp"))
;; the root of the project for the emacs-build-system. (find-files "Documentation" "\\.info$"))
(for-each (lambda (f) (chdir "lisp")))
(install-file f "lisp")) (add-after 'build-info-manual 'set-magit-version
(find-files "Documentation" "\\.info$")) (lambda _
(chdir "lisp") (make-file-writable "magit.el")
#t)) (emacs-substitute-variables "magit.el"
(add-after 'build-info-manual 'set-magit-version ("magit-version" ,version))))
(lambda _ (add-after 'set-magit-version 'patch-exec-paths
(make-file-writable "magit.el") (lambda* (#:key inputs #:allow-other-keys)
(emacs-substitute-variables "magit.el" (let ((perl (assoc-ref inputs "perl")))
("magit-version" ,version)) (make-file-writable "magit-sequence.el")
#t)) (emacs-substitute-variables "magit-sequence.el"
(add-after 'set-magit-version 'patch-exec-paths ("magit-perl-executable" (string-append perl "/bin/perl"))))))
(lambda* (#:key inputs #:allow-other-keys) (add-before 'check 'configure-git
(let ((perl (assoc-ref inputs "perl"))) (lambda _
(make-file-writable "magit-sequence.el") ;; Otherwise some tests fail with error "unable to auto-detect
(emacs-substitute-variables "magit-sequence.el" ;; email address".
("magit-perl-executable" (string-append perl "/bin/perl"))) (setenv "HOME" (getcwd))
#t))) (invoke "git" "config" "--global" "user.name" "toto")
(add-before 'check 'configure-git (invoke "git" "config" "--global" "user.email"
(lambda _ "toto@toto.com")))
;; Otherwise some tests fail with error "unable to auto-detect (add-after 'configure-git 'disable-tramp-test
;; email address". (lambda _
(setenv "HOME" (getcwd)) ;; There is an issue causing TRAMP to fail in the build
(invoke "git" "config" "--global" "user.name" "toto") ;; environment. Setting the tramp-remote-shell parameter of
(invoke "git" "config" "--global" "user.email" ;; the sudo-method to the file name of the shell didn't help.
"toto@toto.com"))) (chdir "..")
(add-after 'configure-git 'disable-tramp-test (substitute* "t/magit-tests.el"
(lambda _ (("^\\(ert-deftest magit-toplevel:tramp.*" all)
;; There is an issue causing TRAMP to fail in the build (string-append all " (skip-unless nil)")))))
;; environment. Setting the tramp-remote-shell parameter of (add-before 'install 'enter-lisp-directory
;; the sudo-method to the file name of the shell didn't help. (lambda _
(chdir "..") (chdir "lisp"))))))
(substitute* "t/magit-tests.el" (native-inputs
(("^\\(ert-deftest magit-toplevel:tramp.*" all) `(("texinfo" ,texinfo)))
(string-append all " (skip-unless nil)"))) (inputs
#t)) `(("git" ,git)
(add-before 'install 'enter-lisp-directory ("perl" ,perl)))
(lambda _ (propagated-inputs
(chdir "lisp") `(("emacs-dash" ,emacs-dash)
#t))))) ("emacs-libgit" ,emacs-libgit)
(native-inputs ("emacs-transient" ,emacs-transient)
`(("texinfo" ,texinfo))) ("emacs-with-editor" ,emacs-with-editor)))
(inputs (home-page "https://magit.vc/")
`(("git" ,git) (synopsis "Emacs interface for the Git version control system")
("perl" ,perl))) (description
(propagated-inputs "With Magit, you can inspect and modify your Git repositories
`(("emacs-dash" ,emacs-dash)
("emacs-libgit" ,emacs-libgit)
("emacs-transient" ,emacs-transient)
("emacs-with-editor" ,emacs-with-editor)))
(home-page "https://magit.vc/")
(synopsis "Emacs interface for the Git version control system")
(description
"With Magit, you can inspect and modify your Git repositories
with Emacs. You can review and commit the changes you have made to with Emacs. You can review and commit the changes you have made to
the tracked files, for example, and you can browse the history of past the tracked files, for example, and you can browse the history of past
changes. There is support for cherry picking, reverting, merging, changes. There is support for cherry picking, reverting, merging,
rebasing, and other common Git operations.") rebasing, and other common Git operations.")
(license license:gpl3+)))) (license license:gpl3+)))
(define-public emacs-magit-svn (define-public emacs-magit-svn
(let ((commit "9e33ceee32f665db59909e1c00a667ccdd04178f")) (let ((commit "9e33ceee32f665db59909e1c00a667ccdd04178f"))