[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/10: gnu: Add go-github-com-bep-golibsass.
From: |
guix-commits |
Subject: |
08/10: gnu: Add go-github-com-bep-golibsass. |
Date: |
Tue, 27 Oct 2020 13:01:23 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ba17af84c889e98e4460022b720f118f76dbf5b9
Author: Ryan Prior <rprior@protonmail.com>
AuthorDate: Mon Oct 12 03:50:26 2020 +0000
gnu: Add go-github-com-bep-golibsass.
* gnu/packages/golang.scm: (go-github-com-bep-golibsass): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/packages/golang.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index b824ef8..d2ca7c4 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -58,6 +58,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))
@@ -5874,3 +5875,61 @@ additions.")
"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)))
- branch master updated (f0c6093 -> 6799e6e), guix-commits, 2020/10/27
- 01/10: services: hpcguix-web: Set 'XDG_CACHE_HOME' to a writable directory., guix-commits, 2020/10/27
- 02/10: gnu: Add gmnisrv., guix-commits, 2020/10/27
- 05/10: gnu: Add go-golang-org-x-xerrors., guix-commits, 2020/10/27
- 03/10: services: Add gmnisrv web service., guix-commits, 2020/10/27
- 10/10: maint: Include 'guix-daemon.cil.in' in the distribution., guix-commits, 2020/10/27
- 04/10: gnu: alacritty: Add search path for 'TERMINFO_DIRS'., guix-commits, 2020/10/27
- 08/10: gnu: Add go-github-com-bep-golibsass.,
guix-commits <=
- 06/10: gnu: go-github-com-google-go-cmp-cmp: Update to 0.5.2., guix-commits, 2020/10/27
- 09/10: maint: Add 'etc/gnu-store.mount.in' to the distribution., guix-commits, 2020/10/27
- 07/10: gnu: Add go-github-com-frankban-quicktest., guix-commits, 2020/10/27