From: jlicht@fsfe.org
To: 49581@debbugs.gnu.org
Cc: Jelle Licht <jlicht@fsfe.org>, phodina <phodina@protonmail.com>
Subject: [bug#49581] [PATCH v5] gnu: Add git-issue.
Date: Mon, 29 May 2023 16:35:42 +0200 [thread overview]
Message-ID: <051ea586df11c135a2a535b6bfad3ab0b73b0e8e.1685370938.git.jlicht@fsfe.org> (raw)
In-Reply-To: <OtwZjjiac_X-7rMHJdn-ruFUDl4kpeL7dC6XcQY9FFDArpj5VP9upJYc9ohZfJ73K8AgvrdaG8lE0oji5nmvITzMKgI7gffpzl-oYUWxCl8=@protonmail.com>
From: phodina <phodina@protonmail.com>
* gnu/packages/version-control.scm (git-issue): New variable.
Co-authored-by: Jelle Licht <jlicht@fsfe.org>
---
Changes in v5:
- Update to latest commit of upstream
- Use gexp-style inputs
- Pass custom #:test-target instead of replacing check phase
- Use search-input-file where possible
- Autoload shellcheck to prevent module import cycle
- Use user-installed git, instead of hardcoding reference
gnu/packages/version-control.scm | 68 ++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 1db0931ac3..4eff59e516 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -42,6 +42,7 @@
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan@gmail.com>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
@@ -140,6 +141,8 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages textutils)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
+ ;; Using autoload to avoid a cycle.
+ #:autoload (gnu packages haskell-apps) (shellcheck)
#:use-module (gnu packages)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
@@ -1365,6 +1368,71 @@ (define-public git-flow
lot easier.")
(license license:bsd-2)))
+(define-public git-issue
+ (let ((commit "4d2bc4173bf803d74bf2ae54f892bd08754f1b48")
+ (revision "1"))
+ (package
+ (name "git-issue")
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/dspinellis/git-issue")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jmx8wjvvxkd3y5im2h96d13dnbpds66djf96b6s23jwfbr7dlsz"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list (string-append "PREFIX=" #$output))
+ #:test-target "test"
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'check 'setup-env
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (setenv "HOME" (getenv "TMPDIR"))
+ (invoke "git" "config" "--global" "user.email" "test")
+ (invoke "git" "config" "--global" "user.name" "Test")
+ (substitute* "test.sh"
+ (("! git diff") "false")
+ (("#!/bin/sh")
+ (string-append
+ "#!"
+ (search-input-file (or native-inputs inputs) "/bin/sh"))))
+ (substitute* "Makefile"
+ (("shellcheck -x")
+ "shellcheck --exclude=SC2001,SC2294,SC3043,SC3003 -x"))))
+ (add-after 'install 'patch-paths
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((path (map
+ (lambda (program)
+ (dirname
+ (search-input-file inputs
+ (string-append "/bin/" program))))
+ '("jq" "curl" "grep" "cat" "find"))))
+ (wrap-program (search-input-file outputs "bin/git-issue")
+ `("PATH" prefix ,path))))))))
+ (native-inputs (list shellcheck git-minimal bash-minimal util-linux))
+ (inputs (list bash-minimal
+ coreutils
+ curl
+ findutils
+ grep
+ jq
+ sed))
+ (synopsis
+ "Git-based decentralized issue management")
+ (description "Git-issue provide a minimalist decentralized issue
+management system based on Git, offering (optional) bidirectional
+integration with GitHub and GitLab issue management.")
+ (home-page "https://github.com/dspinellis/git-issue")
+ (license license:gpl3+))))
+
(define-public stgit
(package
(name "stgit")
base-commit: cf78f5b54975679df97c3015a541114d8278f417
--
2.40.1
prev parent reply other threads:[~2023-05-29 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-15 17:01 [bug#49581] [PATCH] Add git-issues phodina via Guix-patches via
2021-07-17 9:39 ` Giovanni Biscuolo
2021-07-17 10:23 ` Tobias Geerinckx-Rice via Guix-patches via
2021-07-17 12:25 ` phodina via Guix-patches via
2021-09-18 8:31 ` [bug#49581] [PATCH v3] gnu: " phodina via Guix-patches via
2021-09-22 22:14 ` Sarah Morgensen
2021-09-23 7:15 ` Sarah Morgensen
2021-11-01 20:21 ` [bug#49581] [PATCH v4] " phodina via Guix-patches via
2022-11-22 17:38 ` Giovanni Biscuolo
2023-05-29 14:35 ` jlicht [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=051ea586df11c135a2a535b6bfad3ab0b73b0e8e.1685370938.git.jlicht@fsfe.org \
--to=jlicht@fsfe.org \
--cc=49581@debbugs.gnu.org \
--cc=phodina@protonmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.