all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sarah Morgensen <iskarian@mgsn.dev>
To: phodina <phodina@protonmail.com>
Cc: Tobias Geerinckx-Rice <me@tobias.gr>, 49581@debbugs.gnu.org
Subject: [bug#49581] [PATCH v3] gnu: Add git-issues.
Date: Wed, 22 Sep 2021 15:14:53 -0700	[thread overview]
Message-ID: <86v92sw942.fsf@mgsn.dev> (raw)
In-Reply-To: <wSNw-jqZU6IDZfx_hFcgQDluwOnvx4UN5JVK3unRNHaq5gW63kYHuTPN1mzC9cA4WuHrdW-b_ldAXbiRPxpS8Wqk6AYHDQhIumqtuqq21hw=@protonmail.com> (phodina@protonmail.com's message of "Sat, 18 Sep 2021 08:31:45 +0000 (4 days, 9 hours, 54 minutes ago)")

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@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@libremiami.org>
>  ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
>  ;;; Copyright © 2021 François J. <francois-oss@avalenn.eu>
> +;;; Copyright © 2021 Petr Hodina <phodina@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




  reply	other threads:[~2021-09-22 22:16 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 [this message]
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 ` [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=86v92sw942.fsf@mgsn.dev \
    --to=iskarian@mgsn.dev \
    --cc=49581@debbugs.gnu.org \
    --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.