unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "John D. Boy" <jboy@bius.moe>
To: 40025@debbugs.gnu.org
Subject: [bug#40025] [PATCH] Add gitless package definition.
Date: Wed, 11 Mar 2020 16:11:37 +0100	[thread overview]
Message-ID: <20200311151137.32198-1-jboy@bius.moe> (raw)

---
 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" "git@example.com")
+	     (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

             reply	other threads:[~2020-03-11 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 15:11 John D. Boy [this message]
2020-03-11 19:05 ` [bug#40025] [PATCH] Add gitless package definition Tobias Geerinckx-Rice via Guix-patches via
2020-03-12  4:17   ` bug#40025: " Tobias Geerinckx-Rice via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200311151137.32198-1-jboy@bius.moe \
    --to=jboy@bius.moe \
    --cc=40025@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).