all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#43937] [PATCH 0/4] Add golibsass
@ 2020-10-12  3:16 Ryan Prior via Guix-patches via
  2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
  2020-10-27 17:01 ` bug#43937: [PATCH 0/4] Add golibsass Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-10-12  3:16 UTC (permalink / raw)
  To: 43937

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors.
  2020-10-12  3:16 [bug#43937] [PATCH 0/4] Add golibsass Ryan Prior via Guix-patches via
@ 2020-10-12  3:50 ` Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2 Ryan Prior via Guix-patches via
                     ` (2 more replies)
  2020-10-27 17:01 ` bug#43937: [PATCH 0/4] Add golibsass Ludovic Courtès
  1 sibling, 3 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-10-12  3:50 UTC (permalink / raw)
  To: 43937

* 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@jackhill.us>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.com>
+;;; Copyright © 2020 Ryan Prior <rprior@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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#43937] [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2.
  2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
@ 2020-10-12  3:50   ` Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 3/4] gnu: Add go-github-com-frankban-quicktest Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 4/4] gnu: Add go-github-com-bep-golibsass Ryan Prior via Guix-patches via
  2 siblings, 0 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-10-12  3:50 UTC (permalink / raw)
  To: 43937

* 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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#43937] [PATCH 3/4] gnu: Add go-github-com-frankban-quicktest.
  2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2 Ryan Prior via Guix-patches via
@ 2020-10-12  3:50   ` Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 4/4] gnu: Add go-github-com-bep-golibsass Ryan Prior via Guix-patches via
  2 siblings, 0 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-10-12  3:50 UTC (permalink / raw)
  To: 43937

* 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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#43937] [PATCH 4/4] gnu: Add go-github-com-bep-golibsass.
  2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2 Ryan Prior via Guix-patches via
  2020-10-12  3:50   ` [bug#43937] [PATCH 3/4] gnu: Add go-github-com-frankban-quicktest Ryan Prior via Guix-patches via
@ 2020-10-12  3:50   ` Ryan Prior via Guix-patches via
  2 siblings, 0 replies; 6+ messages in thread
From: Ryan Prior via Guix-patches via @ 2020-10-12  3:50 UTC (permalink / raw)
  To: 43937

* 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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#43937: [PATCH 0/4] Add golibsass
  2020-10-12  3:16 [bug#43937] [PATCH 0/4] Add golibsass Ryan Prior via Guix-patches via
  2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
@ 2020-10-27 17:01 ` Ludovic Courtès
  1 sibling, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2020-10-27 17:01 UTC (permalink / raw)
  To: Ryan Prior; +Cc: 43937-done

Hi,

Ryan Prior <rprior@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’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-27 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-12  3:16 [bug#43937] [PATCH 0/4] Add golibsass Ryan Prior via Guix-patches via
2020-10-12  3:50 ` [bug#43937] [PATCH 1/4] gnu: Add go-golang-org-x-xerrors Ryan Prior via Guix-patches via
2020-10-12  3:50   ` [bug#43937] [PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2 Ryan Prior via Guix-patches via
2020-10-12  3:50   ` [bug#43937] [PATCH 3/4] gnu: Add go-github-com-frankban-quicktest Ryan Prior via Guix-patches via
2020-10-12  3:50   ` [bug#43937] [PATCH 4/4] gnu: Add go-github-com-bep-golibsass Ryan Prior via Guix-patches via
2020-10-27 17:01 ` bug#43937: [PATCH 0/4] Add golibsass Ludovic Courtès

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.