summaryrefslogtreecommitdiff
path: root/gnu/packages/version-control.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/version-control.scm')
-rw-r--r--gnu/packages/version-control.scm62
1 files changed, 62 insertions, 0 deletions
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 12e708e4e8d..8504c8b0063 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2912,3 +2913,64 @@ defects faster.")
(synopsis "Git implementation library")
(description "This package provides a Git implementation library.")
(license license:asl2.0)))
+
+(define-public gita
+ (let ((commit "62eb3d69874f75bdd6f95743e57315bc59890f70")
+ (revision "1"))
+ (package
+ (name "gita")
+ (version (git-version "0.10.10" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nosarthur/gita")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1jn5wnmjbdrrgz9fif7s81pv3g92q0wjcqy5qxl77kjy7iv0kpfp"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("git" ,git) ;for tests
+ ("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-pyyaml" ,python-pyyaml)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (substitute* "tests/test_main.py"
+ (("'gita\\\\n'") "'source\\n'")
+ (("'gita'") "'source'"))
+ (invoke (string-append (assoc-ref inputs "git") "/bin/git")
+ "init")
+ (add-installed-pythonpath inputs outputs)
+ (invoke (string-append (assoc-ref inputs "python-pytest")
+ "/bin/pytest")
+ "-vv" "tests")))
+ (add-after 'install 'install-shell-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash-completion (string-append out "/etc/bash_completion.d"))
+ (zsh-completion (string-append out "/etc/zsh/site-functions")))
+ (mkdir-p bash-completion)
+ (copy-file ".gita-completion.bash"
+ (string-append bash-completion "/gita"))
+ (mkdir-p zsh-completion)
+ (copy-file ".gita-completion.zsh"
+ (string-append zsh-completion "/_gita"))))))))
+ (home-page "https://github.com/nosarthur/gita")
+ (synopsis "Command-line tool to manage multiple Git repos")
+ (description "This package provides a command-line tool to manage
+multiple Git repos.
+
+This tool does two things:
+@itemize
+@item display the status of multiple Git repos such as branch, modification,
+commit message side by side
+@item (batch) delegate Git commands/aliases from any working directory
+@end itemize
+
+If several repos are related, it helps to see their status together.")
+ (license license:expat))))