From patchwork Tue Apr 8 07:50:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cayetano Santos X-Patchwork-Id: 41440 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 93E1927BC4A; Tue, 8 Apr 2025 08:52:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id DD3B027BC49 for ; Tue, 8 Apr 2025 08:52:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u23ke-0004AI-F4; Tue, 08 Apr 2025 03:52:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u23kb-00049q-No for guix-patches@gnu.org; Tue, 08 Apr 2025 03:52:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u23kb-0005Dc-BU for guix-patches@gnu.org; Tue, 08 Apr 2025 03:52:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=lKOwUj/v6HMnZzKJYN6ueFdBGUQKOCry4HOXVEOR8vE=; b=oNf95IwGC5tmsXA216FgLwbBCYLFjES52wnIdRm9D2JpGUs/081VkSKbrge2H1xgt31QhU7Xh6KJXiVVffgPZrU0XCE/tpvuCOoWy0N1oDdO7/JB2czHVBZ7lEv/sKW5TClcn3vlprArqpef8t9uch2W0yBDa+v/xtaCNkn9zBoPG0JqZUeko0RQW0xAF+H1U/afxXK3garwADSazt3swIVYPTsIFA7zq606ar8IQYcIcQPI1XbqvOlvLzuMZ6Pj7dEChLzFCIEFi4Dp1UlFq3LWdQdM4+WzWm25XATFBHGnmXQc3a7R1XZAYKVBg71PAHrrsly8r1RLUDjzx9pI8g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1u23kX-0001vy-T6; Tue, 08 Apr 2025 03:52:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77631] [PATCH] gnu: emacs-magit: Simplify package. Resent-From: Cayetano Santos Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, csantosb@inventati.org, divya@subvertising.org, hako@ultrarare.space, ian@retrospec.tv, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Tue, 08 Apr 2025 07:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77631 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77631@debbugs.gnu.org Cc: Cayetano Santos , Andrew Tropin , Cayetano Santos , Divya Ranjan Pattanaik , Hilton Chain , Ian Eure , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Andrew Tropin , Cayetano Santos , Divya Ranjan Pattanaik , Hilton Chain , Ian Eure , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by submit@debbugs.gnu.org id=B.17440986847311 (code B ref -1); Tue, 08 Apr 2025 07:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Apr 2025 07:51:24 +0000 Received: from localhost ([127.0.0.1]:58786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1u23jv-0001to-U5 for submit@debbugs.gnu.org; Tue, 08 Apr 2025 03:51:24 -0400 Received: from lists.gnu.org ([2001:470:142::17]:47156) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1u23jr-0001t2-PE for submit@debbugs.gnu.org; Tue, 08 Apr 2025 03:51:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u23jc-000451-9Z for guix-patches@gnu.org; Tue, 08 Apr 2025 03:51:05 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1u23jY-00057H-JO for guix-patches@gnu.org; Tue, 08 Apr 2025 03:51:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1744098646; bh=lKOwUj/v6HMnZzKJYN6ueFdBGUQKOCry4HOXVEOR8vE=; h=From:To:Cc:Subject:Date:From; b=EJYUY7QFUrSkjjW6CTsQNhjmyT/qp0DgK3PJT8k+iFUhFipYeW3SQq0n1Dld9LbQ1 u93gBJOP8OEJLoF9MrMNacaMpS+J/R2b/q2CV8TnHDr/ZHV9VlZGxUSPiZc+1kESVN L0A31VhD1q6okk09BqHzR9zh7Whrn2YM1BxRpohY= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4ZWytZ6HZGz11Mx; Tue, 8 Apr 2025 07:50:46 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4ZWytZ56MKz11Kj; Tue, 8 Apr 2025 07:50:46 +0000 (UTC) Date: Tue, 8 Apr 2025 09:50:21 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a11:7980:1::2:0; envelope-from=csantosb@inventati.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Cayetano Santos X-ACL-Warn: , Cayetano Santos via Guix-patches X-Patchwork-Original-From: Cayetano Santos via Guix-patches via From: Cayetano Santos Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/emacs-xyz.scm (emacs-magit): Simplify package. These changes are based on emacs-forge package. As all magit related packages share the same structure, let’s build them similarly. [exclude]: Remove unexisting excludes. [arguments]<#:phases>: Remove unnecessary configure-git phase. [arguments]<#:phases>: Remove all unnecessary replace phases. [arguments]<#:phases>: Add new chdir-lisp phase to operate from lisp dir. [arguments]<#:phases>: No need to make files writable. [arguments]<#:phases>: Group all emacs-substitute-variables, and remove relative path. [test-command]: consider updated makefile path. Change-Id: I3c2ae992faf56b9f9e7a68d1b9df430ab3b221a0 --- gnu/packages/emacs-xyz.scm | 51 ++++++++------------------------------ 1 file changed, 10 insertions(+), 41 deletions(-) base-commit: e839cd1108626a6db6c47915f0efa4ab41c6a01c diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 81483bc0dc..1a8ff20860 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -1919,10 +1919,7 @@ (define-public emacs-magit (arguments (list #:tests? #t - #:test-command #~(list "make" "test") - #:exclude #~(cons* "magit-libgit.el" - "magit-libgit-pkg.el" - %default-exclude) + #:test-command #~(list "make" "-C" ".." "test") #:phases #~(modify-phases %standard-phases (add-after 'unpack 'build-info-manual @@ -1930,48 +1927,20 @@ (define-public emacs-magit (invoke "make" "info") ;; Copy info files to the lisp directory, which acts as ;; the root of the project for the emacs-build-system. - (for-each (lambda (f) - (install-file f "lisp")) - (find-files "docs" "\\.info$")))) - (add-after 'build-info-manual 'set-magit-version + (rename-file "docs/magit.info" "lisp/magit.info"))) + (add-after 'build-info-manual 'chdir-lisp (lambda _ - (make-file-writable "lisp/magit.el") - (emacs-substitute-variables "lisp/magit.el" - ("magit-version" #$version)))) - (add-after 'set-magit-version 'patch-exec-paths + (chdir "lisp"))) + (add-after 'chdir-lisp 'patch-version-executables (lambda* (#:key inputs #:allow-other-keys) - (for-each make-file-writable - (list "lisp/magit-git.el" "lisp/magit-sequence.el")) - (emacs-substitute-variables "lisp/magit-git.el" + (emacs-substitute-variables "magit.el" + ("magit-version" #$version)) + (emacs-substitute-variables "magit-git.el" ("magit-git-executable" (search-input-file inputs "/bin/git"))) - (emacs-substitute-variables "lisp/magit-sequence.el" + (emacs-substitute-variables "magit-sequence.el" ("magit-perl-executable" - (search-input-file inputs "/bin/perl"))))) - (add-before 'check 'configure-git - (lambda _ - ;; Otherwise some tests fail with error "unable to auto-detect - ;; email address". - (setenv "HOME" (getcwd)) - (invoke "git" "config" "--global" "user.name" "toto") - (invoke "git" "config" "--global" "user.email" - "toto@toto.com"))) - (replace 'expand-load-path - (lambda args - (with-directory-excursion "lisp" - (apply (assoc-ref %standard-phases 'expand-load-path) args)))) - (replace 'make-autoloads - (lambda args - (with-directory-excursion "lisp" - (apply (assoc-ref %standard-phases 'make-autoloads) args)))) - (replace 'install - (lambda args - (with-directory-excursion "lisp" - (apply (assoc-ref %standard-phases 'install) args)))) - (replace 'build - (lambda args - (with-directory-excursion "lisp" - (apply (assoc-ref %standard-phases 'build) args))))))) + (search-input-file inputs "/bin/perl")))))))) (native-inputs (list texinfo)) (inputs