Message ID | 20230118014510.19320-13-cox.katherine.e@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0F5D827BBEB; Wed, 18 Jan 2023 01:47:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id ECDEF27BBE9 for <patchwork@mira.cbaines.net>; Wed, 18 Jan 2023 01:47:11 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1pHxWy-0002u3-Iz; Tue, 17 Jan 2023 20:46:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWk-0002YD-CJ for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWk-0007BX-4A for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:10 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1pHxWk-0007bo-0f for guix-patches@gnu.org; Tue, 17 Jan 2023 20:46:10 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60910] [PATCH 12/25] gnu: Add xurls. Resent-From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Jan 2023 01:46:09 +0000 Resent-Message-ID: <handler.60910.B.167400635428959@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60910 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60910@debbugs.gnu.org Cc: Katherine Cox-Buday <cox.katherine.e@gmail.com> X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167400635428959 (code B ref -1); Wed, 18 Jan 2023 01:46:09 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2023 01:45:54 +0000 Received: from localhost ([127.0.0.1]:38629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1pHxWU-0007Ww-CQ for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:44450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxW3-0007U3-6C for submit@debbugs.gnu.org; Tue, 17 Jan 2023 20:45:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxW1-00027W-Th for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:25 -0500 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <cox.katherine.e@gmail.com>) id 1pHxVx-0006vC-Uk for guix-patches@gnu.org; Tue, 17 Jan 2023 20:45:25 -0500 Received: by mail-io1-xd31.google.com with SMTP id n85so8154970iod.7 for <guix-patches@gnu.org>; Tue, 17 Jan 2023 17:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L1ZuEiNBgaiQLG10nETuPeGJkLxh+DLMf2FKYAAoGN8=; b=I4fCv0bL68q+0w6EGUqT83r3yWQ7+CGr0gNNn/fnag8HZIBcl21cSkQlwnr3HmG2wy EEL+Z+CIPWSKXO9YIKO8Qkcyl2QbV9mVET10zANowb9b8uPEuf1qf3WFYO9mXmpVvN9E ms+uYP3gCufHBDhmJOd89sGODoR1DdLX0qSRmjG9Wko6H09rntYcRTeL0NF+bPT1HsIp gEodnVR+7P/fazu9na3hU8vtSZZJFE939tps7wpgX99NdHNS8r100smEM26LB95Zu2Hv Vrp569wvmdnX0aTiEN9TTK+7ZsiEzsu+X5/NKAyw+3VqwjCDFia3+jzvQjJY+VLR/XJd Zqmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L1ZuEiNBgaiQLG10nETuPeGJkLxh+DLMf2FKYAAoGN8=; b=oNyaAg9Nya4OLqDV9J/1t6RsCaF8acibvZDGtjWUkO8iyblE6mn5LqR/xyzzOXArvh RcD0eAP3UDm4x17xNqfOa0AMBSM+UehHUbUb4cdk+8DYDu7fosrvDMqu8YC9J/9O9VRd ZfbvSJd+eMD/YhCgro/G5ei9cKikTHfnSEYWBQIAYBVurteZxvo82z4H7sL3KdnLfA9o kbJOwMfgiJThhIuKYkuzZOltJ0T+WZruVibC53dmdvSW6GQWG7FoEHu4I5sIAXaLgofj 7fJEhkGOKbH2p7p8yKodK1eDYSE4PJuT10CwFuOklGLoIK1HlnFLZqUy4ZhHFHAGyG2U sXvw== X-Gm-Message-State: AFqh2kpAj1HexWuafGbz8OPmdPrVquIVoJ4RpiaEEEjiLdF7d8CQjNfl OaQqyY5Tc2S0WcJY43gJ8ol074F+FBc= X-Google-Smtp-Source: AMrXdXuiFdx7glPrJ5HAe8dvhh/7GzbEJCYqyR2kHG7mmXFG28yYYHeZMdLHREhpScb9lZonSXEpuw== X-Received: by 2002:a6b:e61a:0:b0:704:d0d8:632b with SMTP id g26-20020a6be61a000000b00704d0d8632bmr3047395ioh.16.1674006321076; Tue, 17 Jan 2023 17:45:21 -0800 (PST) Received: from washu-v4.home.cox-buday.com (c-174-51-139-101.hsd1.co.comcast.net. [174.51.139.101]) by smtp.gmail.com with ESMTPSA id p32-20020a056638192000b0039e89ea68f9sm7889250jal.135.2023.01.17.17.45.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jan 2023 17:45:20 -0800 (PST) From: Katherine Cox-Buday <cox.katherine.e@gmail.com> Date: Tue, 17 Jan 2023 18:44:57 -0700 Message-Id: <20230118014510.19320-13-cox.katherine.e@gmail.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230118014510.19320-1-cox.katherine.e@gmail.com> References: <20230118014510.19320-1-cox.katherine.e@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=cox.katherine.e@gmail.com; helo=mail-io1-xd31.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
gnu: golang: Add gopls
|
|
Commit Message
Katherine Cox-Buday
Jan. 18, 2023, 1:44 a.m. UTC
* gnu/packages/golang.scm (xurls): New variable. --- gnu/packages/golang.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
Comments
* 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/ -- (
"( via Guix-patches" via <guix-patches@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.
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"))