gnu: emacs-magit: Update to 3.3.0-0.36059e0.

83ede5a02e breaks tests in emacs-magit 3.3.0,
I asked Jonas to make a new release, but it can take quite some time
https://github.com/magit/magit/discussions/4742

* gnu/packages/emacs-xyz.scm (emacs-magit): Update to 3.3.0-0.36059e0.
[propagated-inputs]: Add emacs-compat.
[arguments]<#:phases>: Remove disable-tramp-test.
This commit is contained in:
Andrew Tropin 2022-11-09 15:15:46 +04:00
parent 8918e42de0
commit e7c1f8979a
No known key found for this signature in database
GPG key ID: 2208D20958C1DEB0

View file

@ -992,86 +992,80 @@ (define-public emacs-libgit
(license license:gpl3+)))) (license license:gpl3+))))
(define-public emacs-magit (define-public emacs-magit
(package (let ((commit "36059e0b881cb1465cb5ad0099e55e00845a8222")
(name "emacs-magit") (revision "0"))
(version "3.3.0") (package
(source (name "emacs-magit")
(origin (version (git-version "3.3.0" 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 "0cxyvp2aav27znc7mf6c83q5pddpdniaqkrxn1r8dbgr540qmnpn")))) (file-name (git-file-name name version))
(build-system emacs-build-system) (sha256
(arguments (base32 "12r5z7jbqh74rb9763smh4sblswzwi41wybzcvsy0zhw2r8lpmzv"))))
(list (build-system emacs-build-system)
#:tests? #t (arguments
#:test-command #~(list "make" "test") (list
#:exclude #~(cons* "magit-libgit.el" #:tests? #t
"magit-libgit-pkg.el" #:test-command #~(list "make" "test")
%default-exclude) #:exclude #~(cons* "magit-libgit.el"
#:phases "magit-libgit-pkg.el"
#~(modify-phases %standard-phases %default-exclude)
(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)
(add-after 'build-info-manual 'set-magit-version (install-file f "lisp"))
(lambda _ (find-files "Documentation" "\\.info$"))))
(make-file-writable "lisp/magit.el") (add-after 'build-info-manual 'set-magit-version
(emacs-substitute-variables "lisp/magit.el" (lambda _
("magit-version" #$version)))) (make-file-writable "lisp/magit.el")
(add-after 'set-magit-version 'patch-exec-paths (emacs-substitute-variables "lisp/magit.el"
(lambda* (#:key inputs #:allow-other-keys) ("magit-version" #$version))))
(make-file-writable "lisp/magit-sequence.el") (add-after 'set-magit-version 'patch-exec-paths
(emacs-substitute-variables "lisp/magit-sequence.el" (lambda* (#:key inputs #:allow-other-keys)
("magit-perl-executable" (make-file-writable "lisp/magit-sequence.el")
(search-input-file inputs "/bin/perl"))))) (emacs-substitute-variables "lisp/magit-sequence.el"
(add-before 'check 'configure-git ("magit-perl-executable"
(lambda _ (search-input-file inputs "/bin/perl")))))
;; Otherwise some tests fail with error "unable to auto-detect (add-before 'check 'configure-git
;; email address". (lambda _
(setenv "HOME" (getcwd)) ;; Otherwise some tests fail with error "unable to auto-detect
(invoke "git" "config" "--global" "user.name" "toto") ;; email address".
(invoke "git" "config" "--global" "user.email" (setenv "HOME" (getcwd))
"toto@toto.com"))) (invoke "git" "config" "--global" "user.name" "toto")
(add-after 'configure-git 'disable-tramp-test (invoke "git" "config" "--global" "user.email"
(lambda _ "toto@toto.com")))
;; There is an issue causing TRAMP to fail in the build (replace 'expand-load-path
;; environment. Setting the tramp-remote-shell parameter of (lambda args
;; the sudo-method to the file name of the shell didn't help. (with-directory-excursion "lisp"
(substitute* "t/magit-tests.el" (apply (assoc-ref %standard-phases 'expand-load-path) args))))
(("^\\(ert-deftest magit-toplevel:tramp.*" all) (replace 'install
(string-append all " (skip-unless nil)"))))) (lambda args
(replace 'expand-load-path (with-directory-excursion "lisp"
(lambda args (apply (assoc-ref %standard-phases 'install) args)))))))
(with-directory-excursion "lisp" (native-inputs
(apply (assoc-ref %standard-phases 'expand-load-path) args)))) (list texinfo))
(replace 'install (inputs
(lambda args (list git perl))
(with-directory-excursion "lisp" (propagated-inputs
(apply (assoc-ref %standard-phases 'install) args))))))) (list emacs-dash emacs-with-editor emacs-compat))
(native-inputs (home-page "https://magit.vc/")
(list texinfo)) (synopsis "Emacs interface for the Git version control system")
(inputs (description
(list git perl)) "With Magit, you can inspect and modify your Git repositories
(propagated-inputs
(list emacs-dash 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
(package (package