GNU bug report logs - #60910
[PATCH 12/25] gnu: Add xurls.

Previous Next

Package: guix-patches;

Reported by: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>

Date: Wed, 18 Jan 2023 01:46:09 UTC

Severity: normal

Tags: patch

Merged with 60898, 60899, 60900, 60901, 60902, 60903, 60904, 60905, 60906, 60907, 60908, 60909, 60911, 60912, 60913, 60914, 60915, 60916, 60917, 60918, 60919, 60920, 60921, 60922

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60910 in the body.
You can then email your comments to 60910 AT debbugs.gnu.org in the normal way.

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#60910; Package guix-patches. (Wed, 18 Jan 2023 01:46:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Katherine Cox-Buday <cox.katherine.e <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 18 Jan 2023 01:46:10 GMT) Full text and rfc822 format available.

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

From: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
Subject: [PATCH 12/25] gnu: Add xurls.
Date: Tue, 17 Jan 2023 18:44:57 -0700
* gnu/packages/golang.scm (xurls): New variable.
---
 gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index aa5f5ba159..cabc2a4bab 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -9760,6 +9760,38 @@ (define-public go-go-uber-org-multierr
      "@code{multierr} allows combining one or more Go errors together.")
     (license license:expat)))
 
+(define-public xurls
+  (package
+    (name "xurls")
+    (version "2.4.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mvdan/xurls")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0b040nbk1vwlk1qljavh8w8fn2r243q700n6gr8j2asmnz0xq84p"))))
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "mvdan.cc/xurls/v2"
+       #:unpack-path "mvdan.cc/xurls/v2"
+       #:phases (modify-phases %standard-phases
+                  (replace 'build
+                    (lambda arguments
+                      (apply (assoc-ref %standard-phases
+                                        'build)
+                             `(,@arguments #:import-path
+                               "mvdan.cc/xurls/v2/cmd/xurls")))))))
+    (inputs (list go-golang-org-x-sync go-github-com-rogpeppe-go-internal))
+    (home-page "https://mvdan.cc/xurls/v2/")
+    (synopsis "Extracts URLs from text")
+    (description
+     "Xurls extracts urls from plain text using regular expressions.  It can
+be used as both a binary and a library.")
+    (license license:bsd-3)))
+
 (define-public go-golang-org-x-lint
   (let ((commit "83fdc39ff7b56453e3793356bcff3070b9b96445")
         (revision "0"))
-- 
2.38.1





Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 10:58:02 GMT) Full text and rfc822 format available.

Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 10:58:02 GMT) Full text and rfc822 format available.

Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914 60915 60916 60917 60918. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 10:58:02 GMT) Full text and rfc822 format available.

Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914 60915 60916 60917 60918 60919 60920. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 10:58:02 GMT) Full text and rfc822 format available.

Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914 60915 60916 60917 60918 60919 60920 60921 60922. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 11:44:02 GMT) Full text and rfc822 format available.

Merged 60898 60899 60900 60901 60902 60903 60904 60905 60906 60907 60908 60909 60910 60911 60912 60913 60914 60915 60916 60917 60918 60919 60920 60921 60922. Request was from Katherine Cox-Buday <cox.katherine.e <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 18 Jan 2023 17:08:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#60910; Package guix-patches. (Mon, 06 Feb 2023 22:33:02 GMT) Full text and rfc822 format available.

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

From: "(" <paren <at> disroot.org>
To: "Katherine Cox-Buday" <cox.katherine.e <at> gmail.com>, <60910 <at> debbugs.gnu.org>
Subject: Re: [bug#60910] [PATCH 12/25] gnu: Add xurls.
Date: Mon, 06 Feb 2023 22:32:55 +0000
[Message part 1 (text/plain, inline)]
* gnu/packages/golang.scm (xurls): New variable.

> --- a/gnu/packages/golang.scm
> +++ b/gnu/packages/golang.scm

> @@ -9760,6 +9760,38 @@ (define-public go-go-uber-org-multierr

> +    (arguments
> +     `(#:import-path "mvdan.cc/xurls/v2"
> +       #:unpack-path "mvdan.cc/xurls/v2"
> +       #:phases (modify-phases %standard-phases
> +                  (replace 'build
> +                    (lambda arguments
> +                      (apply (assoc-ref %standard-phases
> +                                        'build)
> +                             `(,@arguments #:import-path
> +                               "mvdan.cc/xurls/v2/cmd/xurls")))))))

I'm not certain what you're trying to accomplish here, but would you be able
to replace this with:

  (arguments
   `(#:import-path "mvdan.cc/xurls/v2"
     #:unpack-path "mvdan.cc/xurls/v2/cmd/xurls"))

?

> +    (inputs (list go-golang-org-x-sync go-github-com-rogpeppe-go-internal))

Add newlines after the ``inputs'' symbol and between the inputs :)

> +    (description
> +     "Xurls extracts urls from plain text using regular expressions.  It can
> +be used as both a binary and a library.")

s/Xurls extracts/This package provides a Go library for extracting/

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

Information forwarded to guix-patches <at> gnu.org:
bug#60910; Package guix-patches. (Tue, 07 Feb 2023 17:52:02 GMT) Full text and rfc822 format available.

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

From: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
To: "( via Guix-patches" via <guix-patches <at> gnu.org>
Cc: "\(" <paren <at> disroot.org>, 60910 <at> debbugs.gnu.org
Subject: Re: [bug#60910] [PATCH 12/25] gnu: Add xurls.
Date: Tue, 07 Feb 2023 10:51:14 -0700
"( via Guix-patches" via <guix-patches <at> gnu.org> writes:

> * gnu/packages/golang.scm (xurls): New variable.
>
>> --- a/gnu/packages/golang.scm
>> +++ b/gnu/packages/golang.scm
>
>> @@ -9760,6 +9760,38 @@ (define-public go-go-uber-org-multierr
>
>> +    (arguments
>> +     `(#:import-path "mvdan.cc/xurls/v2"
>> +       #:unpack-path "mvdan.cc/xurls/v2"
>> +       #:phases (modify-phases %standard-phases
>> +                  (replace 'build
>> +                    (lambda arguments
>> +                      (apply (assoc-ref %standard-phases
>> +                                        'build)
>> +                             `(,@arguments #:import-path
>> +                               "mvdan.cc/xurls/v2/cmd/xurls")))))))
>
> I'm not certain what you're trying to accomplish here, but would you be able
> to replace this with:
>
>   (arguments
>    `(#:import-path "mvdan.cc/xurls/v2"
>      #:unpack-path "mvdan.cc/xurls/v2/cmd/xurls"))
>
> ?

Hm, I'm sure I would have tried that, but I'll check and see if I can
condense this per your suggestion. Thanks!

>> +    (inputs (list go-golang-org-x-sync go-github-com-rogpeppe-go-internal))
>
> Add newlines after the ``inputs'' symbol and between the inputs :)

Why wouldn't `guix style` and `guix lint` correct this? I want to meet
the style guidelines, and I don't mean this as a contrarian statement,
but I'll never get this right unless a tool tells me it's wrong (or
ideally fixes it for me).

>> +    (description
>> +     "Xurls extracts urls from plain text using regular expressions.  It can
>> +be used as both a binary and a library.")
>
> s/Xurls extracts/This package provides a Go library for extracting/

https://guix.gnu.org/en/manual/devel/en/guix.html#Synopses-and-Descriptions:

    [Synopses] must not start with “a” or “the”, which usually does not
    bring anything; for instance, prefer “File-frobbing tool” over “A
    tool that frobs files”. The synopsis should say what the package
    is—e.g., “Core GNU utilities (file, text, shell)”—or what it is used
    for—e.g., the synopsis for GNU grep is “Print lines matching a
    pattern”.

The manual is speaking of synopses, but does it apply to descriptions
too? It seems to me like beginning the description with the name of the
binary is more correct than a self-referential "This package", which I
think meets the manual's qualifier for "does not bring anything".

Also, `Xurls` is both a library and an executable. This package is for
the executable, and a separate one was provided for the library. I think
it's probably better to keep it in the style of "$BINARY (thing that it
does)".

WDYT? These are just my opinions, and I'm open to learning! Please
include the "why" so I can have better judgment in the future.

-- 
Katherine




Information forwarded to guix-patches <at> gnu.org:
bug#60910; Package guix-patches. (Tue, 07 Feb 2023 17:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 Mar 2023 12:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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