diff mbox series

[bug#66704,1/1] gnu: patman: Wrap program with git.

Message ID 377171f13a5d00cc460c394a6e0226f6cdcf217a.1698076987.git.zimon.toutoune@gmail.com
State New
Headers show
Series patman depends on Git | expand

Commit Message

Simon Tournier Oct. 23, 2023, 4:26 p.m. UTC
* gnu/packages/bootloaders.scm (patman): Replace by 'package/inherit'.
[arguments]: Add 'wrap-program' that uses git-minimal dependency.
[inputs]: Add git-minimal.

Change-Id: Id4ebadd518f271baa087161b10455ec03d6f959b
---
 gnu/packages/bootloaders.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index fb20ba0efa..cdc26a0c9e 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -18,6 +18,7 @@ 
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2021 Stefan <stefan-guix@vodafonemail.de>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -65,6 +66,7 @@  (define-module (gnu packages bootloaders)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages valgrind)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages python-web)
@@ -864,8 +866,7 @@  (define-public python-u-boot-pylib
 ;;; This is packaged separately, as it can be used in other contexts than for
 ;;; U-Boot development.
 (define-public patman
-  (package
-    (inherit u-boot)
+  (package/inherit u-boot
     (name "patman")
     (build-system pyproject-build-system)
     (arguments
@@ -890,8 +891,17 @@  (define-public patman
             (lambda _
               (substitute* "pyproject.toml"
                 (("patman.__main__:run_patman")
-                 "patman.__main__")))))))
-    (inputs (list python-pygit2 python-requests python-u-boot-pylib))
+                 "patman.__main__"))))
+          (add-after 'install 'wrap-program
+            (lambda _
+              (wrap-program (string-append #$output "/bin/patman")
+                `("PATH" ":" suffix
+                  (,(string-append
+                     #$(this-package-input "git-minimal") "/bin")))))))))
+    (inputs (list git-minimal
+                  python-pygit2
+                  python-requests
+                  python-u-boot-pylib))
     (synopsis "Patch automation tool")
     (description "Patman is a patch automation script which:
 @itemize