[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: magit: Update to 2.2.0.
From: |
Alex Kost |
Subject: |
Re: [PATCH] gnu: magit: Update to 2.2.0. |
Date: |
Sat, 22 Aug 2015 23:48:06 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Mark H Weaver (2015-08-22 20:31 +0300) wrote:
> Alex Kost <address@hidden> writes:
>
>> From 55e67d4f3867f11a77b9a91d4c3c54599846cc83 Mon Sep 17 00:00:00 2001
>> From: Alex Kost <address@hidden>
>> Date: Mon, 17 Aug 2015 21:44:40 +0300
>> Subject: [PATCH] gnu: magit: Update to 2.2.0.
>>
>> * gnu/packages/emacs.scm (magit): Update to 2.2.0.
>> [inputs]: Remove 'git:gui'.
>> [propagated-inputs]: Add 'dash', remove 'git-modes'.
>> [arguments]: Enable tests. Add VERSION, PREFIX and DASH_DIR to
>> 'make-flags'. Remove 'configure', 'augment-load-path' and
>> 'post-install' phases.
>
> [...]
>
>> + #:make-flags
>> + (list (string-append "VERSION=" ,version)
>
> Interesting, you have to tell it what it's own version number is?
Yes, it tries to define the version using "git describe --tags ..." and
then it generates "magit-version.el" which is used only to set 'magit-version'
variable.
I think the main problem with this package (and many other packages,
sigh) is that there is no configure script, so there are some
workarounds to reinvent the wheel.
>> (add-before
>> 'build 'patch-exec-paths
>> (lambda* (#:key inputs #:allow-other-keys)
>> - (let ((git (assoc-ref inputs "git"))
>> - (git:gui (assoc-ref inputs "git:gui")))
>> - (emacs-substitute-variables "magit.el"
>> - ("magit-git-executable" (string-append git "/bin/git"))
>> - ("magit-gitk-executable" (string-append git:gui
>> - "/bin/gitk"))))))
>
> Does magit 2 no longer use gitk?
I don't see any sign of gitk (I don't understand why it was used before).
>> - (add-before
>> - 'build 'augment-load-path
>> - (lambda* (#:key inputs #:allow-other-keys)
>> - ;; Allow git-commit-mode.el & co. to be found.
>> - (let ((git-modes (assoc-ref inputs "git-modes")))
>> - (setenv "EMACSLOADPATH"
>> - (string-append ":" git-modes
>> "/share/emacs/site-lisp"))
>> - #t)))
>> - (add-after
>> - 'install 'post-install
>> - (lambda* (#:key outputs #:allow-other-keys)
>> - (emacs-generate-autoloads
>> - ,name (string-append (assoc-ref outputs "out")
>> - "/share/emacs/site-lisp/")))))))
>
> Are the autoloads installed by magit 2?
Yes.
>> + (let ((git (assoc-ref inputs "git")))
>> + (emacs-substitute-variables "lisp/magit-git.el"
>> + ("magit-git-executable" (string-append git
>> "/bin/git")))))))))
>
> Return #t from this phase procedure.
Ah, OK. At first I blindly thought if 'emacs-substitute-variables'
succeeds, it returns #t, but now I see that it's not the case. I see
that other emacs packages (except 'emacs-w3m') don't return #t after
this "substitute vars" phase. So perhaps it would be better to modify
'emacs-batch-edit-file' (and 'emacs-batch-eval') from (guix build
emacs-utils) to return #t if everything was OK. WDYT?
> Otherwise, looks good to me! I haven't yet tried magit 2, but for now I
> will take your word for it that we don't need magit 1 anymore. We can
> always add it later if there's demand for it.
OK, but I don't think it should be done, because it is obsolete and
there will be no Magit 1.4.3 or 1.5, only 2.X.X.
But switching from Magit 1.4 to 2 requires some… I don't know how to
say… attention, especially if you have many settings for the old Magit.
The new magit was mostly rewritten, so its settings differ a lot.
--
Alex
- [PATCH] gnu: magit: Update to 2.2.0., Alex Kost, 2015/08/17
- Re: [PATCH] gnu: magit: Update to 2.2.0., Thompson, David, 2015/08/17
- Re: [PATCH] gnu: magit: Update to 2.2.0., Mark H Weaver, 2015/08/22
- Re: [PATCH] gnu: magit: Update to 2.2.0.,
Alex Kost <=
- [PATCH] gnu: magit: Update to 2.2.1., Alex Kost, 2015/08/25
- Re: [PATCH] gnu: magit: Update to 2.2.1., Ludovic Courtès, 2015/08/27
- Re: [PATCH] gnu: magit: Update to 2.2.1., Alex Kost, 2015/08/27
- Magit 2 troubleshooting, Ludovic Courtès, 2015/08/29
- Re: Magit 2 troubleshooting, Alex Kost, 2015/08/29
- Re: Magit 2 troubleshooting, Alex Kost, 2015/08/29