Subject: bug#40025: closed (Re: [bug#40025] [PATCH] Add gitless package definition.)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 12 Mar 2020 04:17:02 +0000

Your bug report

#40025: [PATCH] Add gitless package definition.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
40025: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=40025
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#40025] [PATCH] Add gitless package definition.
From: Tobias Geerinckx-Rice <[email-masked]>
Cc: [email-masked]
Date: Thu, 12 Mar 2020 05:17:10 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Tobias Geerinckx-Rice via Guix-patches via 写道：
> I'll try to make it work here and will push a modified version 
> if I
> succeed.  It would be nice if I could get rid of propagation, 
> and the
> path to a (non-native) git still needs to be embedded so the 
> user
> doesn't need to install git themselves.

Done and done.  I added a copyright line for you and (using this 
package) pushed this to master as 
f930814afae8e20125dab58b060a691ea8398e26.

Thanks!

T G-R

Subject: [PATCH] Add gitless package definition.
From: "John D. Boy" <[email-masked]>
To: [email-masked]
Date: Wed, 11 Mar 2020 16:11:37 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

---
 gnu/packages/version-control.scm | 50 ++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 52626f8076..7aac933d15 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2373,3 +2373,53 @@ interrupted, published, and collaborated on while in progress.")
 videos, datasets, and graphics with text pointers inside Git, while storing the
 file contents on a remote server.")
     (license license:expat)))
+
+(define-public gitless
+  (package
+    (name "gitless")
+    ;; The PyPI package lacks the test suite, so we build it directly from the
+    ;; git repository.
+    (version "0.8.8")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gitless-vcs/gitless")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+	 (add-before 'build 'loosen-requirements
+	   (lambda _
+	     (substitute* "setup.py"
+               ;; Don't insist on an older version of pygit2.
+	       (("pygit2==") "pygit2>="))
+	     (substitute* "requirements.txt"
+	       (("pygit2==") "pygit2>="))
+	     #t))
+	 (add-before 'check 'prepare-for-tests
+	   (lambda _
+             ;; Find the 'gl' command.
+	     (rename-file "gl.py" "gl")
+	     (setenv "PATH" (string-append (getcwd) ":" (getenv "PATH")))
+             ;; The tests try to run git as if it were already set up.
+	     (setenv "HOME" (getcwd))
+	     (invoke "git" "config" "--global" "user.email" "[email-masked]")
+	     (invoke "git" "config" "--global" "user.name" "guix")
+	     #t)))))
+    (native-inputs
+     ;; Required for tests.
+     `(("git-minimal" ,git-minimal)))
+    (propagated-inputs
+     `(("python-clint" ,python-clint)
+       ("python-pygit2" ,python-pygit2)
+       ("python-sh" ,python-sh)))
+    (home-page "https://gitless.com")
+    (synopsis
+     "A version control system built on top of Git")
+    (description
+     "A version control system built on top of Git")
+    (license license:expat)))
-- 
2.20.1