guix_mirror_bot pushed a commit to branch next-master
in repository guix.
commit 32727afc6f77b91e2a0af98102debd2d18c22ffe
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Jan 6 20:24:43 2026 +0100
gnu: hg-commitsigs: Switch to pyproject.
* gnu/packages/version-control.scm (hg-commitsigs):
[arguments]<#:imported-modules, #:modules>: Switch to
pyproject-build-system, remove unneeded modules.
<#:phases>: Simplify phase 'patch-paths.
<#:install-plan>: Relocate field, use gexps.
Change-Id: I4c7c264203ad56acd609620284e1fd2595822235
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/version-control.scm | 46 +++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 0a3edb0ff4..ad324c610c 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2874,34 +2874,26 @@ history. It implements the changeset evolution concept
for Mercurial.")
"059gm66q06m6ayl4brsc517zkw3ahmz249b6xm1m32ac5y24wb9x"))))
(build-system copy-build-system)
(arguments
- `(#:imported-modules ((guix build python-build-system)
- ,@%copy-build-system-modules)
- #:modules ((srfi srfi-1)
- (guix build python-build-system)
- ;; Don't use `%copy-build-system-modules' because
- ;; `standard-phases' from (guix build gnu-build-system)
- ;; shadows the one from (guix build copy-build-system),
- ;; which is the one we actually want.
+ (list
+ #:imported-modules (append %pyproject-build-system-modules
+ %copy-build-system-modules)
+ #:modules `((guix build pyproject-build-system)
(guix build copy-build-system)
- ((guix build gnu-build-system) #:prefix gnu)
- (guix build utils)
- (guix build gremlin)
- (ice-9 ftw)
- (guix elf))
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((gpg (search-input-file inputs "/bin/gpg"))
- (openssl (search-input-file inputs "/bin/openssl")))
- (substitute* "commitsigs.py"
- (("b'gpg',") (string-append "b'" gpg "',"))
- (("b'openssl',") (string-append "b'" openssl "',")))))))
- #:install-plan
- `(("commitsigs.py" ,(string-append "lib/python"
- (python-version
- (assoc-ref %build-inputs
"python"))
-
"/site-packages/hgext3rd/commitsigs.py")))))
+ (guix build utils))
+ #:install-plan
+ #~`(("commitsigs.py"
+ ,(string-append "lib/python"
+ (python-version
+ #$(this-package-native-input "python"))
+ "/site-packages/hgext3rd/commitsigs.py")))
+ #:phases
+ (with-extensions (list (pyproject-guile-json))
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda _
+ (substitute* "commitsigs.py"
+ (("b'(gpg|openssl)'," _ bin)
+ (format #f "b'~a'," (which bin))))))))))
(native-inputs
(list python))
(inputs