GNU bug report logs - #49581
[PATCH] Add git-issues

Previous Next

Package: guix-patches;

Reported by: phodina <phodina <at> protonmail.com>

Date: Thu, 15 Jul 2021 17:02:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 49581 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Thu, 15 Jul 2021 17:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to phodina <phodina <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 15 Jul 2021 17:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: phodina <phodina <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Subject: [PATCH] Add git-issues
Date: Thu, 15 Jul 2021 17:01:38 +0000
From dbfbc69932b29dd5b3a6bed2de3f67d89bc50bfa Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina <at> protonmail.com>
Date: Thu, 15 Jul 2021 18:58:40 +0200
Subject: [PATCH] gnu: Add git-issues


diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7c1dbe8b26..47768fdc05 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1267,6 +1267,31 @@ subcommands helps automate some parts of the flow to make working with it a
 lot easier.")
     (license license:bsd-2)))

+(define-public git-issues
+(package
+  (name "git-issues")
+  (version "67aacad35888b4c51e2d7be35c86fef137874f12")
+  (source (origin
+            (method git-fetch)
+            (uri
+	      (git-reference
+		(url "https://github.com/dspinellis/git-issue")
+		(commit version)))
+            (sha256
+             (base32
+              "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f
+      #:make-flags (list (string-append "PREFIX="(assoc-ref %outputs "out")))
+      #:phases (modify-phases %standard-phases
+		(delete 'configure)
+		(delete 'build))))
+  (synopsis "Git-based decentralized issue management")
+  (description "This is a minimalist decentralized issue management system based on Git, offering (optional) biderectional integration with GitHub and GitLab issue management. It has the following advantages over other systems.")
+  (home-page "https://github.com/dspinellis/git-issue")
+  (license license:gpl2)))
+
 (define-public stgit
   (package
     (name "stgit")
--
2.31.1




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Sat, 17 Jul 2021 09:42:01 GMT) Full text and rfc822 format available.

Message #8 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: phodina <phodina <at> protonmail.com>, 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH] Add git-issues
Date: Sat, 17 Jul 2021 11:39:48 +0200
[Message part 1 (text/plain, inline)]
Hello phodina,

thank you for your patch!

phodina via Guix-patches via <guix-patches <at> gnu.org> writes:

[...]

> +(define-public git-issues
> +(package
> +  (name "git-issues")
> +  (version "67aacad35888b4c51e2d7be35c86fef137874f12")

Upstream does not publish releases (does not tag branches): could you
please just add a comment, it could be useful to other Guix developers,
also to remember to check if things will change in the future.

[...]

> +  (license license:gpl2)))

The source code of the main script [1] states the license is gpl3+:
«version 3 of the License, or (at your option) any later version.»

Can you please submit an updated version of your patch?

Thanks! Gio'


[1] https://github.com/dspinellis/git-issue/blob/master/git-issue.sh

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Sat, 17 Jul 2021 10:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: phodina <phodina <at> protonmail.com>
Cc: 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH] Add git-issues
Date: Sat, 17 Jul 2021 12:23:29 +0200
Hi Petr,

In addition to what Gio' wrote:

On 2021-07-15 19:01, phodina via Guix-patches via wrote:
> +  (description "This is a minimalist decentralized issue management
> system based on Git, offering (optional) biderectional integration

'optional bidirectional'.

> with GitHub and GitLab issue management. It has the following
> advantages over other systems.")

If what came next wasn't too promotional, you can write 'features' 
instead, and use @enumerate to list [a subset of] them.  Otherwise the 
description's rather short.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Sat, 17 Jul 2021 12:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: phodina <phodina <at> protonmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH] Add git-issues
Date: Sat, 17 Jul 2021 12:25:28 +0000
Hi Tobias & Giovanni,

thanks for the suggestions. Here's the fixed patch

Kind regards
Petr

---
index 7c1dbe8b26..91af0badcb 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1267,6 +1267,40 @@ subcommands helps automate some parts of the flow to make working with it a
 lot easier.")
     (license license:bsd-2)))

+(define-public git-issues
+(package
+  (name "git-issues")
+  (version "67aacad35888b4c51e2d7be35c86fef137874f12") ; no tags
+  (source (origin
+            (method git-fetch)
+            (uri (git-reference
+                  (url "https://github.com/dspinellis/git-issue")
+                  (commit version)))
+            (sha256
+             (base32
+              "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q"))))
+  (build-system gnu-build-system)
+  (arguments
+    '(#:tests? #f
+      #:make-flags (list (string-append "PREFIX="(assoc-ref %outputs "out")))
+      #:phases (modify-phases %standard-phases
+      (delete 'configure)
+      (delete 'build))))
+  (synopsis "Git-based decentralized issue management")
+  (description "This is a minimalist decentralized issue management system
+based on Git, offering (optional) biderectional integration with GitHub
+and GitLab issue management.
+It has the following advantages over other systems:
+@enumerate
+@item No backend, no dependencies
+@item Decentralized asynchronous management
+@item Transparent text file format
+@item Git-based
+@end enumerate
+")
+  (home-page "https://github.com/dspinellis/git-issue")
+  (license license:gpl3)))
+
 (define-public stgit
   (package
     (name "stgit")
--
2.31.1




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Sat, 18 Sep 2021 08:32:01 GMT) Full text and rfc822 format available.

Message #17 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: phodina <phodina <at> protonmail.com>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 49581 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add git-issues.
Date: Sat, 18 Sep 2021 08:31:45 +0000
* gnu/packages/version-control.scm (git-issues): New variable.

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 7c1dbe8b26..cff1190094 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -39,6 +39,7 @@
 ;;; Copyright © 2021 LibreMiami <packaging-guix <at> libremiami.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
 ;;; Copyright © 2021 François J. <francois-oss <at> avalenn.eu>
+;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1267,6 +1268,36 @@ subcommands helps automate some parts of the flow to make working with it a
 lot easier.")
     (license license:bsd-2)))

+(define-public git-issues
+  (let ((commit "67aacad35888b4c51e2d7be35c86fef137874f12")
+        (revision "1"))
+    (package
+      (name "git-issues")
+      (version commit)
+      (source (origin
+                (method git-fetch)
+                (uri
+                 (git-reference
+                  (url "https://github.com/dspinellis/git-issue")
+                  (commit version)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q"))))
+      (build-system gnu-build-system)
+      (arguments
+       '(#:tests? #f
+         #:make-flags (list (string-append "PREFIX="(assoc-ref %outputs "out")))
+         #:phases (modify-phases %standard-phases
+                    (delete 'configure)
+                    (delete 'build))))
+      (synopsis "Git-based decentralized issue management")
+      (description "Git-issues 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.32.0




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Wed, 22 Sep 2021 22:16:02 GMT) Full text and rfc822 format available.

Message #20 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: phodina <phodina <at> protonmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH v3] gnu: Add git-issues.
Date: Wed, 22 Sep 2021 15:14:53 -0700
Hello Petr,

Thanks for your updated patch.  This looks like a great tool.  After
making the changes below, I gave it a try, and I might use it myself
when I can't use fossil!

I was unable to apply your patch with `git am'; I had to guess which
commit it was based on and manually apply it.  In the future, please
configure your git to include the base commit with

  git config --local format.useautobase whenAble

or use the `--base' command line option:

  git format-patch --base=a916d50566

phodina <phodina <at> protonmail.com> writes:

> * gnu/packages/version-control.scm (git-issues): New variable.
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 7c1dbe8b26..cff1190094 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -39,6 +39,7 @@
>  ;;; Copyright © 2021 LibreMiami <packaging-guix <at> libremiami.org>
>  ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
>  ;;; Copyright © 2021 François J. <francois-oss <at> avalenn.eu>
> +;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -1267,6 +1268,36 @@ subcommands helps automate some parts of the flow to make working with it a
>  lot easier.")
>      (license license:bsd-2)))
>
> +(define-public git-issues

The name should be "git-issue" since that's the name of the project and
the command.

> +  (let ((commit "67aacad35888b4c51e2d7be35c86fef137874f12")
> +        (revision "1"))
> +    (package
> +      (name "git-issues")
> +      (version commit)
> +      (source (origin
> +                (method git-fetch)
> +                (uri
> +                 (git-reference
> +                  (url "https://github.com/dspinellis/git-issue")
> +                  (commit version)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32
> +                  "1z6dpwbikmiq5acpbji4kvmxqc2jw995rfk5703k5mvp5ps9a29q"))))
> +      (build-system gnu-build-system)
> +      (arguments
> +       '(#:tests? #f

Please add a comment explaining why tests are disabled.  For example, I
attempted to run the tests and found that they must be run in a git
repository, and that a global user.name and user.email must be
configured.

> +         #:make-flags (list (string-append "PREFIX="(assoc-ref %outputs "out")))

Please add a space after "PREFIX=" and wrap the line.

> +         #:phases (modify-phases %standard-phases
> +                    (delete 'configure)
> +                    (delete 'build))))
> +      (synopsis "Git-based decentralized issue management")
> +      (description "Git-issues provide a minimalist decentralized issue
> +management system based on Git, offering (optional) bidirectional integration
> +with GitHub and GitLab issue management.")

This is a bit short.  How about:

--8<---------------cut here---------------start------------->8---
      (description "@command{git-issue} provides a minimalist decentralized
issue management system based on Git, offering (optional) bidirectional
integration with GitHub and GitLab issue management.  Issues are stored as
simple text files, so no special tools are required to access your data, and
issues are changed and shared through Git, so no special infrastructure is
necessary to manage your data.")
--8<---------------cut here---------------end--------------->8---


> +      (home-page "https://github.com/dspinellis/git-issue")
> +      (license license:gpl3+))))
> +
>  (define-public stgit
>    (package
>      (name "stgit")
> --
> 2.32.0

Additionally, it looks like git-issue depends on several tools: cat,
curl, grep, git, find, jq, and sed, at least.  These should probably be
included in inputs and substituted in the script, perhaps with:

--8<---------------cut here---------------start------------->8---
(add-before 'install 'patch-paths
  (lambda* (#:key inputs #:allow-other-keys)
    (define (input-file input file)
      (string-append (assoc-ref inputs input) "/" file))

    (substitute* '("git-issue.sh"
                   "lib/git-issue/import-export.sh"
                   "scripts/replacerefs.sh")
      (("\\bcat\\b") (input-file "coreutils" "bin/cat"))
      (("\\bcurl\\b") (input-file "curl" "bin/curl"))
      (("\\bdate\\b") (input-file "coreutils" "bin/date"))
      (("\\bgit\\b") (input-file "git-minimal" "bin/git"))
      (("\\bgrep\\b") (input-file "grep" "bin/grep"))
      (("\\bfind\\b") (input-file "findutils" "bin/find"))
      (("\\bjq\\b") (input-file "jq" "bin/jq"))
      (("\\bsed\\b") (input-file "sed" "bin/sed"))
      ;; Substitute back any usage examples.
      (("((usage|Example): )/gnu/store/[^/]+/bin/(\\w+)"
        all start exec)
       (string-append start exec)))))
--8<---------------cut here---------------end--------------->8---

I may have missed a few utilities, though.

Thank you!

--
Sarah




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Thu, 23 Sep 2021 07:16:01 GMT) Full text and rfc822 format available.

Message #23 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: phodina <phodina <at> protonmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH v3] gnu: Add git-issues.
Date: Thu, 23 Sep 2021 00:15:50 -0700
Hi again,

Sarah Morgensen <iskarian <at> mgsn.dev> writes:

> Additionally, it looks like git-issue depends on several tools: cat,
> curl, grep, git, find, jq, and sed, at least.  These should probably be
> included in inputs and substituted in the script, perhaps with:
>
> (add-before 'install 'patch-paths
>   (lambda* (#:key inputs #:allow-other-keys)
>     (define (input-file input file)
>       (string-append (assoc-ref inputs input) "/" file))
>
>     (substitute* '("git-issue.sh"
>                    "lib/git-issue/import-export.sh"
>                    "scripts/replacerefs.sh")
>       (("\\bcat\\b") (input-file "coreutils" "bin/cat"))
>       (("\\bcurl\\b") (input-file "curl" "bin/curl"))
>       (("\\bdate\\b") (input-file "coreutils" "bin/date"))
>       (("\\bgit\\b") (input-file "git-minimal" "bin/git"))
>       (("\\bgrep\\b") (input-file "grep" "bin/grep"))
>       (("\\bfind\\b") (input-file "findutils" "bin/find"))
>       (("\\bjq\\b") (input-file "jq" "bin/jq"))
>       (("\\bsed\\b") (input-file "sed" "bin/sed"))
>       ;; Substitute back any usage examples.
>       (("((usage|Example): )/gnu/store/[^/]+/bin/(\\w+)"
>         all start exec)
>        (string-append start exec)))))
>
> I may have missed a few utilities, though.

I belatedly realized you could also use 'wrap-program', which is
probably less error-prone.  For example (untested, and not very pretty):

--8<---------------cut here---------------start------------->8---
(let ((out (assoc-ref outputs "out"))
      (paths (map
              (lambda (input)
                (string-append (assoc-ref 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"))))
--8<---------------cut here---------------end--------------->8---

Thinking about it, I'm not sure if the bash autocompletion script
("etc/bash_completion.d/git-issue") should be wrapped as well.

Hope that helps,
--
Sarah




Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Mon, 01 Nov 2021 20:23:02 GMT) Full text and rfc822 format available.

Message #26 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: phodina <phodina <at> protonmail.com>
To: Sarah Morgensen <iskarian <at> mgsn.dev>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH v4] gnu: Add git-issues.
Date: Mon, 01 Nov 2021 20:21:43 +0000
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 <at> avalenn.eu>
 ;;; Copyright © 2021 Julien Lepiller <julien <at> lepiller.eu>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2021 Petr Hodina <phodina <at> 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






Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Tue, 22 Nov 2022 17:39:01 GMT) Full text and rfc822 format available.

Message #29 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: phodina <phodina <at> protonmail.com>, Sarah Morgensen <iskarian <at> mgsn.dev>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 49581 <at> debbugs.gnu.org
Subject: Re: [bug#49581] [PATCH v4] gnu: Add git-issues.
Date: Tue, 22 Nov 2022 18:38:06 +0100
[Message part 1 (text/plain, inline)]
Hello phodina and Sarah,

please do you have some updates on this patch?

I can help testing if needed, tomorrow I'm going to test the v4 (the
last one) of your patch and will provide some feedback

Thanks! Gio'

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#49581; Package guix-patches. (Mon, 29 May 2023 14:36:01 GMT) Full text and rfc822 format available.

Message #32 received at 49581 <at> debbugs.gnu.org (full text, mbox):

From: jlicht <at> fsfe.org
To: 49581 <at> debbugs.gnu.org
Cc: Jelle Licht <jlicht <at> fsfe.org>, phodina <phodina <at> protonmail.com>
Subject: [PATCH v5] gnu: Add git-issue.
Date: Mon, 29 May 2023 16:35:42 +0200
From: phodina <phodina <at> protonmail.com>

* gnu/packages/version-control.scm (git-issue): New variable.

Co-authored-by: Jelle Licht <jlicht <at> 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 <at> lepiller.eu>
 ;;; Copyright © 2021 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2021 jgart <jgart <at> dismail.de>
+;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
 ;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan <at> gmail.com>
 ;;; Copyright © 2022 Maxime Devos <maximedevos <at> 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





This bug report was last modified 2 years and 15 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.