guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: gnu: stgit: Update to 0.21.


From: guix-commits
Subject: 05/05: gnu: stgit: Update to 0.21.
Date: Thu, 16 Jan 2020 21:58:21 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 90b8f4e292da0d6980be89915607b64879f0d35c
Author: Tobias Geerinckx-Rice <address@hidden>
AuthorDate: Fri Jan 17 03:51:29 2020 +0100

    gnu: stgit: Update to 0.21.
    
    * gnu/packages/version-control.scm (stgit): Update to 0.21.
    [native-inputs]: Add perl.
    [arguments]: Build with default Python (3).
    Add ‘hard-code-version’ and ‘patch-tests’ phases.
    Fix and run all remaining tests in the ‘check’ phase.
---
 gnu/packages/version-control.scm | 32 ++++++++++++++++++++++++--------
 1 file changed, 24 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index e0fe4e2..20db6b4 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1049,7 +1049,7 @@ lot easier.")
 (define-public stgit
   (package
     (name "stgit")
-    (version "0.18")
+    (version "0.21")
     (source
      (origin
        (method git-fetch)
@@ -1058,20 +1058,36 @@ lot easier.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0ydgg744m671nkhg7h4q2z3b9vpbc9914rbc0wcgimqfqsxkxx2y"))))
+        (base32 "00pmz93znl418lsjwy4mr0chp8i2w27h1xjysa05f62smsv91yyc"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("perl" ,perl)))
     (inputs
      `(("git" ,git)))
     (arguments
-     `(#:python ,python-2
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'hard-code-version
+           (lambda _
+             ;; setup.py tries to cleverly extract the version number from the
+             ;; git history, which the source checkout lacks.  Hard-code one.
+             (substitute* "setup.py"
+               (("get_ver\\(\\)")
+                (format #f "'~a'" ,version)))
+             #t))
+         (add-before 'check 'patch-tests
+           (lambda _
+             (substitute* (list "t/t1900-mail.sh"
+                                "t/t7504-commit-msg-hook.sh")
+               (("/bin/sh")
+                (which "bash")))
+             #t))
          (replace 'check
            (lambda _
-             ;; Two tests will fail -> disable them. TODO: fix the failing 
tests
-             (delete-file "t/t3300-edit.sh")
-             (delete-file "t/t7504-commit-msg-hook.sh")
-             (invoke "make" "test"))))))
+             (invoke "make"
+                     "PERL_PATH=perl"
+                     (string-append "SHELL_PATH=" (which "bash"))
+                     "test"))))))
     (home-page "http://procode.org/stgit/";)
     (synopsis "Stacked Git")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]