Subject: [bug#70855] [PATCH 78/92] gnu: borgmatic: Move to pyproject-build-system.

From: Nicolas Graves <[email-masked]>
Date: Fri, 10 May 2024 00:54:13 +0200

* gnu/packages/backup.scm (borgmatic):
  [build-system]: Move to pyproject-build-system.
  [arguments]: Migrate 'check phase replacement to <#:test-flags>.

Change-Id: I916e87f10c75718c4e840d97eaa78623ed2a4fd3
---
 gnu/packages/backup.scm | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 5e74439bffc..663eb2568fe 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -24,6 +24,7 @@
 ;;; Copyright © 2022 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2022 Feng Shu <[email-masked]>
 ;;; Copyright © 2023 Timo Wilken <[email-masked]>
+;;; Copyright © 2024 Nicolas Graves <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -46,6 +47,7 @@ (define-module (gnu packages backup)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system pyproject)
   #:use-module (guix build-system qt)
   #:use-module (guix download)
   #:use-module (guix gexp)
@@ -1332,7 +1334,7 @@ (define-public borgmatic
        (uri (pypi-uri "borgmatic" version))
        (sha256
         (base32 "1xmqv0gg2ic7lp5kmygr9f6qkabsr86mma7pigan12vk2bcdbw31"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
      (list
       #:phases #~(modify-phases %standard-phases
@@ -1348,15 +1350,7 @@ (define-public borgmatic
                          (("(module.get_local_path.+ == )'borg'" all start)
                           (string-append start "'"
                                          (search-input-file inputs "bin/borg")
-                                         "'")))))
-                   (replace 'check
-                     (lambda* (#:key tests? #:allow-other-keys)
-                       (when tests?
-                         ;; Tests require the installed executable.
-                         (setenv "PATH"
-                                 (string-append #$output "/bin" ":"
-                                                (getenv "PATH")))
-                         (invoke "pytest")))))))
+                                         "'"))))))))
     (inputs (list borg
                   python-apprise
                   python-colorama
-- 
2.41.0