summary refs log tree commit diff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-03-14 13:13:40 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-03-14 13:13:40 +0100
commit961d2ee2695b38503b463d055e9c7edbcc0bf307 (patch)
tree82d9b40477a1d4d88e75a187b2b637a56751480b /gnu/packages/version-control.scm
parent7cf79d7a51ff5dde4fc430fab2296b5f7de08953 (diff)
parentaebba13c0bef5a58697f1a9fe8337967cc01300f (diff)
downloadguix-961d2ee2695b38503b463d055e9c7edbcc0bf307.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm72
1 files changed, 71 insertions, 1 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index a798892e40..6451037fdb 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2020 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 John D. Boy <jboy@bius.moe>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -551,6 +552,75 @@ everything from small to very large projects with speed and efficiency.")
        ("perl" ,perl)
        ("zlib" ,zlib)))))
 
+(define-public gitless
+  (package
+    (name "gitless")
+    (version "0.8.8")
+    (source
+     (origin
+       ;; The PyPI package lacks a test suite.  Build directly from git.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gitless-vcs/gitless")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "048kl27zjr68hgs70g3l98ci9765wxva6azzrhcdys7nsdd493n6"))
+       (file-name (git-file-name name version))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'loosen-requirements
+           (lambda _
+             (substitute* "setup.py"
+               ;; Using Guix's python-pygit2 1.1.0 appears to work fine…
+               (("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")))
+         (replace 'wrap
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (git (assoc-ref inputs "git")))
+               (wrap-program (string-append out "/bin/gl")
+                 `("PATH" ":" prefix (,(string-append git "/bin")))
+                 `("PYTHONPATH" ":" =
+                   (,(string-append out "/lib/python"
+                                    ,(version-major+minor
+                                      (package-version python))
+                                    "/site-packages:")
+                    ,(getenv "PYTHONPATH"))))
+               #t))))))
+    (native-inputs
+     `(("git-for-tests" ,git-minimal)))
+    (inputs
+     `(("git" ,git-minimal)
+       ("python-clint" ,python-clint)
+       ("python-pygit2" ,python-pygit2)
+       ("python-sh" ,python-sh)))
+    (home-page "https://gitless.com")
+    (synopsis "Simple version control system built on top of Git")
+    (description
+     "Gitless is a Git-compatible version control system that aims to be easy to
+learn and use.  It simplifies the common workflow by committing changes to
+tracked files by default and saving any uncommitted changes as part of a branch.
+
+The friendly @command{gl} command-line interface gives feedback and helps you
+figure out what to do next.
+
+Gitless is implemented on top of Git and its commits and repositories are
+indistinguishable from Git's.  You (or other contributors) can always fall back
+on @command{git}, and use any regular Git hosting service.")
+    (license license:expat)))
+
 (define-public libgit2
   (package
     (name "libgit2")
@@ -1097,7 +1167,7 @@ will work.")
                           "gitflow-shFlags")))))
          (delete 'configure)
          (delete 'build))))
-    (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
+    (home-page "https://nvie.com/posts/a-successful-git-branching-model/")
     (synopsis "Git extensions for Vincent Driessen's branching model")
     (description
      "Vincent Driessen's branching model is a git branching and release