From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id F6VLCbbSg1+TFwAA0tVLHw (envelope-from ) for ; Mon, 12 Oct 2020 03:51:18 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CEi6BLbSg1/lVAAAbx9fmQ (envelope-from ) for ; Mon, 12 Oct 2020 03:51:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B4AE894053B for ; Mon, 12 Oct 2020 03:51:17 +0000 (UTC) Received: from localhost ([::1]:46658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRork-0006IW-LZ for larch@yhetil.org; Sun, 11 Oct 2020 23:51:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRorX-00061Q-NG for guix-patches@gnu.org; Sun, 11 Oct 2020 23:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57999) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRorX-0007av-E1 for guix-patches@gnu.org; Sun, 11 Oct 2020 23:51:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRorX-00040i-Dh for guix-patches@gnu.org; Sun, 11 Oct 2020 23:51:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43937] [PATCH 4/4] gnu: Add go-github-com-bep-golibsass. Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 12 Oct 2020 03:51:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43937 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43937@debbugs.gnu.org Received: via spool by 43937-submit@debbugs.gnu.org id=B43937.160247463815365 (code B ref 43937); Mon, 12 Oct 2020 03:51:03 +0000 Received: (at 43937) by debbugs.gnu.org; 12 Oct 2020 03:50:38 +0000 Received: from localhost ([127.0.0.1]:41309 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRor8-0003zk-Bq for submit@debbugs.gnu.org; Sun, 11 Oct 2020 23:50:38 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:33904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRor7-0003zX-15 for 43937@debbugs.gnu.org; Sun, 11 Oct 2020 23:50:37 -0400 Date: Mon, 12 Oct 2020 03:50:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1602474630; bh=1i279iOFLVbExdpWeqDDU4xce6SgwDqZSMO5i5F0uco=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=tg9QFDPKx4E0sgDDqWcKVEj2T6mvqPI2f4PAbLSyWp1ZXZYW3iSURWqwgE8sb4Wdg pzpy8Jg9Uis6XahgfhlLFwsGLSfIVbgg5CuUKc5YzSMAjtXlQ8WFvgtGlR66MBaRVA u5E3+vakAFYozpRrHOPJKHRsOF4vQtA2n4N87cFM= Message-ID: <20201012034957.15477-4-rprior@protonmail.com> In-Reply-To: <20201012034957.15477-1-rprior@protonmail.com> References: <20201012034957.15477-1-rprior@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Ryan Prior , Ryan Prior via Guix-patches From: Ryan Prior via Guix-patches via X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=protonmail.com header.s=protonmail header.b=tg9QFDPK; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: 9wjqx1wXjXtA * 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)) =20 @@ -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.g= o") + (("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-quickte= st) + ("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))) --=20 2.17.1