From patchwork Fri Jun 18 19:29:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 30454 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 417D527BC78; Fri, 18 Jun 2021 20:41:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 58F9827BC81 for ; Fri, 18 Jun 2021 20:41:11 +0100 (BST) Received: from localhost ([::1]:34610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luKMU-0000BA-BK for patchwork@mira.cbaines.net; Fri, 18 Jun 2021 15:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luKCk-0002wp-VI for guix-patches@gnu.org; Fri, 18 Jun 2021 15:31:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luKCk-0002DY-Ma for guix-patches@gnu.org; Fri, 18 Jun 2021 15:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luKCk-0001va-E0 for guix-patches@gnu.org; Fri, 18 Jun 2021 15:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#46234] [PATCH] Add new gopkg.in/yaml.v3 Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 19:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46234 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: 46234@debbugs.gnu.org Received: via spool by 46234-submit@debbugs.gnu.org id=B46234.16240446057271 (code B ref 46234); Fri, 18 Jun 2021 19:31:02 +0000 Received: (at 46234) by debbugs.gnu.org; 18 Jun 2021 19:30:05 +0000 Received: from localhost ([127.0.0.1]:58257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luKBh-0001sO-LY for submit@debbugs.gnu.org; Fri, 18 Jun 2021 15:30:05 -0400 Received: from mail-wm1-f43.google.com ([209.85.128.43]:46820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luKBf-0001s8-1T for 46234@debbugs.gnu.org; Fri, 18 Jun 2021 15:29:55 -0400 Received: by mail-wm1-f43.google.com with SMTP id h22-20020a05600c3516b02901a826f84095so6348011wmq.5 for <46234@debbugs.gnu.org>; Fri, 18 Jun 2021 12:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2xYHFOV3AUB1m9TjpiwhGwtbihQ7J1wuHnXLadjjgEo=; b=ic0OYXQAghInQnbWVkIhnCvYsQMwQgBsbpqrRKbzG4sg1KSV6E2DyYrtjTCtImVMQp fhaw0Y4+/bKDm6LNcnSpiILd1iCJc0gms7DkPedFP9WMuMa69TxZG/V7TKwMsn8qTMlF jWUgkbXNDBUSEKlpA7BJgbqSjqujjBw6fP9FwrtbVu2xQC2cry57uu3nK8qJvN4g14hN yBiWwXgraIMtYdZHWSNCQTvVnPfvIx02jm8NIpBYseQakAcFk+fnVCX0dkDJWmNkpwpY tz6sXpNLA2zudGfpf+p8c1W3NShe9dwvP9zvIkidyOwcDr4OSqMRZokW+J9lcQyhN38o w14g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2xYHFOV3AUB1m9TjpiwhGwtbihQ7J1wuHnXLadjjgEo=; b=sEtojgQi42hWlUzOzRtx4AZGKuYVFzgkZhvfx2iJ1GxxQCctqspJHdhX+nGHcSpal+ 2houJOV9C0ty6Be61LOO2fnWysErE6VQfPsNjSriRS32zR62dDlP+bFgw4gPnEeskg4r 7ZX1PIPxW9JDCg+Vht3AcaXJ5a9ViedZR1F7xjzSOdVJbCxl1ycxpVLuG6SulexGkwHQ 3ZaLmUe7s3HXqGX2Ae3FlI66q3bv0fkmxD8iQS4QgOghOp2XZegTRwIcAkyxNU7EwPzQ DUI73Jv2ONzKRQ1vF6Xv71jlbR9eYSJ1r7OuRn08e4aiVcr26Sdb5MBG3KfudT6z88yg P/8A== X-Gm-Message-State: AOAM5329Fs423PU6oQjSKLLNZBWLjI0OQJcMy9KH6UGrR6fE6QzPq4V2 FSE1uZ8fbmQLscvKX4PiXleXK13LoDDP+XkHWcAczF5X X-Google-Smtp-Source: ABdhPJzVup/zfI6Bkhl48HTy6awltPeaDtWAVZ/6V7oo0DotFzeApRZAtLyR5ue+/RwKFHTBx1K0505yM2Kx0RHiL8U= X-Received: by 2002:a7b:c446:: with SMTP id l6mr11835385wmi.171.1624044588885; Fri, 18 Jun 2021 12:29:48 -0700 (PDT) MIME-Version: 1.0 References: <87y2b75j4s.fsf@yoctocell.xyz> In-Reply-To: <87y2b75j4s.fsf@yoctocell.xyz> From: Sharlatan Hellseher Date: Fri, 18 Jun 2021 19:29:38 +0000 Message-ID: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Xinglu, I've reviewed your comments and updated the patch, thanks for your time! On Fri, 18 Jun 2021 at 14:42, Xinglu Chen wrote: > > On Mon, Feb 01 2021, Sharlatan Hellseher wrote: > > > +(define-public go-gopkg-in-yaml-v3 > > + (package > > + (name "go-gopkg-in-yaml-v3") > > + (version "3") > > + (source > > + (origin > > + (method git-fetch) > > + (uri (git-reference > > + (url "https://gopkg.in/yaml.v3.git") > > + (commit (string-append "v" version)))) > > + (file-name (git-file-name name version)) > > + (sha256 > > + (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g")))) > > + (build-system go-build-system) > > + (arguments > > + '(#:import-path "gopkg.in/yaml.v3")) > > + (native-inputs > > + `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1))) > > + (home-page "https://gopkg.in/yaml.v2") > ^^ > Shouldn’t this be “https://gopkg.in/yaml.v3”? > > > + (synopsis "YAML reader and writer for the Go language") > > + (description > > + "This package provides a Go library for encode and decode YAML > > +values. > > + > > +v3 specification difference: > > +@itemize > > +@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are > > +being decoded into a typed bool value. Otherwise they behave as a string. > > +Booleans in YAML 1.2 are true/false only. > > + > > +@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as > > +specified in YAML 1.2, because most parsers still use the old format. Octals in > > +the 0o777 format are supported though, so new files work. > > + > > +@item Does not support base-60 floats. These are gone from YAML 1.2, and were > > +actually never supported by this package as it's clearly a poor choice. > > +@end itemize\n") > > + > > +@end itemize\n") > > Duplicate lines/syntax error. I don’t think \n is needed either. > > Otherwise, LGTM. From 55ccab7fbbd5a1610ce630f17e79db8bdc6b4d79 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 18 Jun 2021 20:27:27 +0100 Subject: [PATCH] gnu: Add gopkg.in/yaml.v3 * gnu/packages/golang.scm (go-gopkg-in-yml-v3): New variable --- gnu/packages/golang.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 8c3c81ceda..19a70c7a82 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2021 Ricardo Wurmus ;;; Copyright © 2021 Guillaume Le Vaillant +;;; Copyright © 2021 Sharlatan Hellseher ;;; ;;; This file is part of GNU Guix. ;;; @@ -2413,6 +2414,45 @@ which satisfies the cron expression.") values.") (license license:asl2.0))) +(define-public go-gopkg-in-yaml-v3 + (package + (name "go-gopkg-in-yaml-v3") + (version "3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gopkg.in/yaml.v3.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "06f4lnrp494wqaygv09dggr2dwf3z2bawqhnlnnwiamg5y787k4g")))) + (build-system go-build-system) + (arguments + '(#:import-path "gopkg.in/yaml.v3")) + (native-inputs + `(("go-gopkg-in-check-v1" ,go-gopkg-in-check-v1))) + (home-page "https://gopkg.in/yaml.v3") + (synopsis "YAML reader and writer for the Go language") + (description + "This package provides a Go library for encode and decode YAML +values. + +v3 specification difference: +@itemize +@item YAML 1.1 bools (yes/no, on/off) are supported as long as they are +being decoded into a typed bool value. Otherwise they behave as a string. +Booleans in YAML 1.2 are true/false only. + +@item Octals encode and decode as 0777 per YAML 1.1, rather than 0o777 as +specified in YAML 1.2, because most parsers still use the old format. Octals in +the 0o777 format are supported though, so new files work. + +@item Does not support base-60 floats. These are gone from YAML 1.2, and were +actually never supported by this package as it's clearly a poor choice. +@end itemize") + (license license:asl2.0))) + (define-public go-github-com-mattn-go-isatty (package (name "go-github-com-mattn-go-isatty") -- 2.32.0