[PATCH 0/4] Add golibsass

DoneSubmitted by Ryan Prior.
Details
2 participants
  • Ludovic Courtès
  • Ryan Prior
Owner
unassigned
Severity
normal
R
R
Ryan Prior wrote on 12 Oct 2020 05:16
(address . guix-patches@gnu.org)
20201012031606.14643-1-rprior@protonmail.com
While golibsass is considered a tricky package to build, requiring C++ and gotoolchains, this package should make it trivial for Guix hackers.
Also included are two new packages that golibsass depends on, and a requiredupdate 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
R
R
Ryan Prior wrote on 12 Oct 2020 05:50
[PATCH 1/4] gnu: Add go-golang-org-x-xerrors.
(address . 43937@debbugs.gnu.org)
20201012034957.15477-1-rprior@protonmail.com
* gnu/packages/golang.scm (go-golang-org-x-xerrors): New variable.--- gnu/packages/golang.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
Toggle diff (45 lines)diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scmindex 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
R
R
Ryan Prior wrote on 12 Oct 2020 05:50
[PATCH 3/4] gnu: Add go-github-com-frankban-quicktest.
(address . 43937@debbugs.gnu.org)
20201012034957.15477-3-rprior@protonmail.com
* gnu/packages/golang.scm (go-github-com-frankban-quicktest): New variable.--- gnu/packages/golang.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
Toggle diff (37 lines)diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scmindex 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
R
R
Ryan Prior wrote on 12 Oct 2020 05:50
[PATCH 2/4] gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2.
(address . 43937@debbugs.gnu.org)
20201012034957.15477-2-rprior@protonmail.com
* 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(-)
Toggle diff (30 lines)diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scmindex 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
R
R
Ryan Prior wrote on 12 Oct 2020 05:50
[PATCH 4/4] gnu: Add go-github-com-bep-golibsass.
(address . 43937@debbugs.gnu.org)
20201012034957.15477-4-rprior@protonmail.com
* gnu/packages/golang.scm: (go-github-com-bep-golibsass): New variable.--- gnu/packages/golang.scm | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+)
Toggle diff (76 lines)diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scmindex 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
L
L
Ludovic Courtès wrote on 27 Oct 2020 18:01
Re: [bug#43937] [PATCH 0/4] Add golibsass
(name . Ryan Prior)(address . rprior@protonmail.com)(address . 43937-done@debbugs.gnu.org)
87pn5361tc.fsf@gnu.org
Hi,
Ryan Prior <rprior@protonmail.com> skribis:
Toggle quote (6 lines)> 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’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 43937@debbugs.gnu.org