From: phodina via Guix-patches via <guix-patches@gnu.org>
To: Sarah Morgensen <iskarian@mgsn.dev>
Cc: Tobias Geerinckx-Rice <me@tobias.gr>, 49581@debbugs.gnu.org
Subject: [bug#49581] [PATCH v4] gnu: Add git-issues.
Date: Mon, 01 Nov 2021 20:21:43 +0000 [thread overview]
Message-ID: <wir783gaPHI99iaqoN83Gb_1XkYO9jj_dD5vGi-EeiDKFF6hBEHbK1m7WcQOrD-g2QIsvnCrkWnwvx9IwlUlbmMK0GSjSCEr7lqTXAciXnI=@protonmail.com> (raw)
In-Reply-To: <OtwZjjiac_X-7rMHJdn-ruFUDl4kpeL7dC6XcQY9FFDArpj5VP9upJYc9ohZfJ73K8AgvrdaG8lE0oji5nmvITzMKgI7gffpzl-oYUWxCl8=@protonmail.com>
Hi,
Thanks Sarah for the feedback and tips on how to wrap the programs in the shell script.
In fact the patch is almost done, but I couldn't figure out the correct procedure for the map on line 1324. I get that the list of strings should be mapped into paths to the binaries, but after struggling I gave up and found book about Scheme to learn first.
So here is the patch with the minor issue.
Hope this utility helps.
--8<---------------cut here---------------start------------->8---
Subject: [PATCH v4] gnu: Add git-issue.
* gnu/packages/version-control.scm (git-issue): New variable.
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 064212db9f..c685f2f4b5 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -41,6 +41,7 @@
;;; Copyright © 2021 François J. <francois-oss@avalenn.eu>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -96,6 +97,7 @@ (define-module (gnu packages version-control)
#:use-module (gnu packages groff)
#:use-module (gnu packages guile)
#:use-module (gnu packages guile-xyz)
+ #:use-module (gnu packages haskell-apps)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
#:use-module (gnu packages mail)
@@ -1277,6 +1279,75 @@ (define-public git-flow
lot easier.")
(license license:bsd-2)))
+(define-public git-issue
+ (let ((commit "67aacad35888b4c51e2d7be35c86fef137874f12")
+ (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
+ "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'check 'setup-env
+ (lambda _
+ (setenv "HOME" (getenv "TMPDIR"))
+ (invoke "git" "config" "--global" "user.email" "test")
+ (invoke "git" "config" "--global" "user.name" "Test")
+ (substitute* "test.sh"
+ (("! git diff") "git diff")
+ (("#!/bin/sh") (string-append "#!" (which "bash")))
+ (("gi=.*") (string-append "gi=" (getcwd) "/git-issue.sh\n")))
+ (substitute* "Makefile"
+ (("shellcheck -x") "shellcheck --exclude=SC2001,SC3043,SC3003 -x"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "test"))))
+ (add-before 'install 'patch-paths
+ (lambda* (#:key build-inputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out"))
+ (paths (map
+ (lambda (input)
+ (string-append (assoc-ref build-inputs input) "/bin"))
+ '("coreutils" "curl" "findutils"
+ "git-minimal" "grep" "jq" "sed"))))
+ (for-each
+ (lambda (program)
+ (wrap-program
+ (string-append out "/" program)
+ `("PATH" prefix ,paths)))
+ '("bin/git-issue" "lib/git-issue/import-export.sh"))))))))
+ (native-inputs `(("shellcheck" ,shellcheck)))
+ (inputs `(("bash-minimal" ,bash-minimal)
+ ("git" ,git)
+ ("coreutils" ,coreutils)
+ ("grep" ,grep)
+ ("curl" ,curl)
+ ("findutils" ,findutils)
+ ("sed" ,sed)
+ ("util-linux" ,util-linux)
+ ("jq" ,jq)))
+ (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")
--
2.33.1
next prev parent reply other threads:[~2021-11-01 20:23 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 ` phodina via Guix-patches via [this message]
2022-11-22 17:38 ` [bug#49581] [PATCH v4] " Giovanni Biscuolo
2023-05-29 14:35 ` [bug#49581] [PATCH v5] gnu: Add git-issue jlicht
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='wir783gaPHI99iaqoN83Gb_1XkYO9jj_dD5vGi-EeiDKFF6hBEHbK1m7WcQOrD-g2QIsvnCrkWnwvx9IwlUlbmMK0GSjSCEr7lqTXAciXnI=@protonmail.com' \
--to=guix-patches@gnu.org \
--cc=49581@debbugs.gnu.org \
--cc=iskarian@mgsn.dev \
--cc=me@tobias.gr \
--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.