GNU bug report logs - #43937
[PATCH 0/4] Add golibsass

Previous Next

Package: guix-patches;

Reported by: Ryan Prior <rprior <at> protonmail.com>

Date: Mon, 12 Oct 2020 03:17:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 43937 in the body.
You can then email your comments to 43937 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#43937; Package guix-patches. (Mon, 12 Oct 2020 03:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ryan Prior <rprior <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 12 Oct 2020 03:17:02 GMT) Full text and rfc822 format available.

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

From: Ryan Prior <rprior <at> protonmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/4] Add golibsass
Date: Mon, 12 Oct 2020 03:16:13 +0000
While golibsass is considered a tricky package to build, requiring C++ and go
toolchains, this package should make it trivial for Guix hackers.

Also included are two new packages that golibsass depends on, and a required
update to go-cmp.

Ryan Prior (4):
  gnu: Add go-golang-org-x-xerrors.
  gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2.
  gnu: Add go-github-com-frankban-quicktest.
  gnu: Add go-github-com-bep-golibsass.

 gnu/packages/golang.scm | 117 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 115 insertions(+), 2 deletions(-)

-- 
2.17.1






Information forwarded to guix-patches <at> gnu.org:
bug#43937; Package guix-patches. (Mon, 12 Oct 2020 03:51:02 GMT) Full text and rfc822 format available.

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

From: Ryan Prior <rprior <at> protonmail.com>
To: 43937 <at> debbugs.gnu.org
Subject: [PATCH 1/4] gnu: Add go-golang-org-x-xerrors.
Date: Mon, 12 Oct 2020 03:50:03 +0000
* gnu/packages/golang.scm (go-golang-org-x-xerrors): New variable.
---
 gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b89b62cea2..166e7a265f 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -19,6 +19,7 @@
 ;;; Copyright © 2020 Jack Hill <jackhill <at> jackhill.us>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
 ;;; Copyright © 2020 Nicolas Goaziou <mail <at> nicolasgoaziou.com>
+;;; Copyright © 2020 Ryan Prior <rprior <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -939,6 +940,30 @@ time.")
  spec in Go.")
       (license license:bsd-3))))
 
+(define-public go-golang-org-x-xerrors
+  (let ((commit "5ec99f83aff198f5fbd629d6c8d8eb38a04218ca")
+        (revision "0"))
+    (package
+      (name "go-golang-org-x-xerrors")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://go.googlesource.com/xerrors")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1dbzc3gmf2haazpv7cgmv97rq40g2xzwbglc17vas8dwhgwgwrzb"))))
+      (build-system go-build-system)
+      (arguments
+       '(#:import-path "golang.org/x/xerrors"))
+      (synopsis "Go 1.13 error values")
+      (description
+       "This package holds the transition packages for the new Go 1.13 error values.")
+      (home-page "https://godoc.org/golang.org/x/xerrors")
+      (license license:bsd-3))))
+
 (define-public go-github-com-burntsushi-toml
   (package
     (name "go-github-com-burntsushi-toml")
-- 
2.17.1






Information forwarded to guix-patches <at> gnu.org:
bug#43937; Package guix-patches. (Mon, 12 Oct 2020 03:51:02 GMT) Full text and rfc822 format available.

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

From: Ryan Prior <rprior <at> protonmail.com>
To: 43937 <at> debbugs.gnu.org
Subject: [PATCH 3/4] gnu: Add go-github-com-frankban-quicktest.
Date: Mon, 12 Oct 2020 03:50:15 +0000
* gnu/packages/golang.scm (go-github-com-frankban-quicktest): New variable.
---
 gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 343363d23c..df6fbdfa94 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5845,3 +5845,30 @@ Included are the following:
 except that it adds convenience functions that use the fmt package to format
 error messages.")
     (license license:bsd-3)))
+
+(define-public go-github-com-frankban-quicktest
+  (package
+    (name "go-github-com-frankban-quicktest")
+    (version "1.11.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/frankban/quicktest")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0b1b44b2hli2p969gqz30z8v9z6ahlklpqzi17nwk1lsjz9yv938"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/frankban/quicktest"))
+    (propagated-inputs
+     `(("go-github-com-google-go-cmp-cmp" ,go-github-com-google-go-cmp-cmp)
+       ("go-github-com-kr-pretty" ,go-github-com-kr-pretty)))
+    (home-page "https://github.com/frankban/quicktest")
+    (synopsis "Quick helpers for testing Go applications")
+    (description
+     "Package quicktest provides a collection of Go helpers for writing
+tests.")
+    (license license:expat)))
-- 
2.17.1






Information forwarded to guix-patches <at> gnu.org:
bug#43937; Package guix-patches. (Mon, 12 Oct 2020 03:51:03 GMT) Full text and rfc822 format available.

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

From: Ryan Prior <rprior <at> protonmail.com>
To: 43937 <at> debbugs.gnu.org
Subject: [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2.
Date: Mon, 12 Oct 2020 03:50:09 +0000
* gnu/packages/golang.scm: (go-github-com-google-go-cmp-cmp): Update to 0.5.2.
---
 gnu/packages/golang.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 166e7a265f..343363d23c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -4046,7 +4046,7 @@ colorized or SGR defined output to the standard output.")
 (define-public go-github-com-google-go-cmp-cmp
   (package
     (name "go-github-com-google-go-cmp-cmp")
-    (version "0.3.1")
+    (version "0.5.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -4055,11 +4055,13 @@ colorized or SGR defined output to the standard output.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1caw49i0plkjxir7kdf5qhwls3krqwfmi7g4h392rdfwi3kfahx1"))))
+                "0qchy411jm9q2l9mf7x3ry2ycaqp9xdhf2nx14qrpzcxfigv2705"))))
     (build-system go-build-system)
     (arguments
      '(#:import-path "github.com/google/go-cmp/cmp"
        #:unpack-path "github.com/google/go-cmp"))
+    (propagated-inputs
+     `(("go-golang-org-x-xerrors" ,go-golang-org-x-xerrors)))
     (synopsis "Determine equality of values in Go")
     (description "This package provides a more powerful and safer
 alternative to @code{reflect.DeepEqual} for comparing whether two values
-- 
2.17.1






Information forwarded to guix-patches <at> gnu.org:
bug#43937; Package guix-patches. (Mon, 12 Oct 2020 03:51:03 GMT) Full text and rfc822 format available.

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

From: Ryan Prior <rprior <at> protonmail.com>
To: 43937 <at> debbugs.gnu.org
Subject: [PATCH 4/4] gnu: Add go-github-com-bep-golibsass.
Date: Mon, 12 Oct 2020 03:50:26 +0000
* gnu/packages/golang.scm: (go-github-com-bep-golibsass): New variable.
---
 gnu/packages/golang.scm | 59 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index df6fbdfa94..c87a712d11 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -57,6 +57,7 @@
   #:use-module (gnu packages mp3)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages web)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
@@ -5872,3 +5873,61 @@ error messages.")
      "Package quicktest provides a collection of Go helpers for writing
 tests.")
     (license license:expat)))
+
+(define-public go-github-com-bep-golibsass
+  (package
+    (name "go-github-com-bep-golibsass")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/bep/golibsass")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0xk3m2ynbydzx87dz573ihwc4ryq0r545vz937szz175ivgfrhh3"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (delete-file-recursively "libsass_src")
+           #t))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/bep/golibsass/libsass"
+       #:unpack-path "github.com/bep/golibsass"
+       ;; The dev build tag modifies the build to link to system libsass
+       ;; instead of including the bundled one (which we remove.)
+       ;; https://github.com/bep/golibsass/blob/v0.7.0/internal/libsass/a__cgo_dev.go
+       #:build-flags '("-tags" "dev")
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'generate-bindings
+           ;; Generate bindings for system libsass, replacing the
+           ;; pre-generated bindings.
+           (lambda* (#:key inputs unpack-path #:allow-other-keys)
+             (mkdir-p (string-append "src/" unpack-path "/internal/libsass"))
+             (let ((libsass-src (string-append (assoc-ref inputs "libsass-src") "/src")))
+               (substitute* (string-append "src/" unpack-path "/gen/main.go")
+                 (("filepath.Join\\(rootDir, \"libsass_src\", \"src\"\\)")
+                  (string-append "\"" libsass-src "\""))
+                 (("../../libsass_src/src/")
+                  libsass-src)))
+             (invoke "go" "generate" (string-append unpack-path "/gen"))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? import-path #:allow-other-keys)
+             (if tests?
+                 (invoke "go" "test" import-path "-tags" "dev"))
+             #t)))))
+    (propagated-inputs
+     `(("libsass" ,libsass)))
+    (native-inputs
+     `(("go-github-com-frankban-quicktest" ,go-github-com-frankban-quicktest)
+       ("libsass-src" ,(package-source libsass))))
+    (home-page "https://github.com/bep/golibsass")
+    (synopsis "Easy to use Go bindings for LibSass")
+    (description
+     "This package provides SCSS compiler support for Go applications.")
+    (license license:expat)))
-- 
2.17.1






Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Tue, 27 Oct 2020 17:02:02 GMT) Full text and rfc822 format available.

Notification sent to Ryan Prior <rprior <at> protonmail.com>:
bug acknowledged by developer. (Tue, 27 Oct 2020 17:02:02 GMT) Full text and rfc822 format available.

Message #22 received at 43937-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Ryan Prior <rprior <at> protonmail.com>
Cc: 43937-done <at> debbugs.gnu.org
Subject: Re: [bug#43937] [PATCH 0/4] Add golibsass
Date: Tue, 27 Oct 2020 18:01:03 +0100
Hi,

Ryan Prior <rprior <at> protonmail.com> skribis:

> Ryan Prior (4):
>   gnu: Add go-golang-org-x-xerrors.
>   gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2.
>   gnu: Add go-github-com-frankban-quicktest.
>   gnu: Add go-github-com-bep-golibsass.

Pushed, thanks!

Ludo’.




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

This bug report was last modified 3 years and 151 days ago.

Previous Next


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