From patchwork Wed Nov 29 22:35:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 57106 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6ED2D27BBEA; Wed, 29 Nov 2023 19:41:03 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8ED8427BBED for ; Wed, 29 Nov 2023 19:40:58 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r8QOn-0000lW-DA; Wed, 29 Nov 2023 14:39:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8QOe-0000ai-QQ for guix-patches@gnu.org; Wed, 29 Nov 2023 14:38:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r8QOe-0000q9-IK for guix-patches@gnu.org; Wed, 29 Nov 2023 14:38:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r8QOm-00065g-6U; Wed, 29 Nov 2023 14:39:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66827] [PATCH v3 28/66] gnu: go-github-com-bep-golibsass: Move to (gnu packages golang-web). Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: cox.katherine.e+guix@gmail.com, guix-patches@gnu.org Resent-Date: Wed, 29 Nov 2023 19:39:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66827 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66827@debbugs.gnu.org Cc: Sharlatan Hellseher , Katherine Cox-Buday X-Debbugs-Original-Xcc: Katherine Cox-Buday Received: via spool by 66827-submit@debbugs.gnu.org id=B66827.170128670123144 (code B ref 66827); Wed, 29 Nov 2023 19:39:04 +0000 Received: (at 66827) by debbugs.gnu.org; 29 Nov 2023 19:38:21 +0000 Received: from localhost ([127.0.0.1]:51330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8QO5-000617-3Q for submit@debbugs.gnu.org; Wed, 29 Nov 2023 14:38:21 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:54422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8QMa-0005nT-Cm for 66827@debbugs.gnu.org; Wed, 29 Nov 2023 14:36:52 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40b27726369so1102025e9.0 for <66827@debbugs.gnu.org>; Wed, 29 Nov 2023 11:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701286595; x=1701891395; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y9/J4Y1eGfIE6QZH+aeDmYtKYNS/5Wp/iuyIyrQ+tKI=; b=E9QvBYwcsoR5ma4u32LEcKtAEywssZ+csXJVf6E55U1uALWaUpvoJaYN4bJYWLmod2 o72cWjfa/S7pu5zI1vy8JXeVwWFto/YOd5aPBKfj7kFEGFE5u2MiGZMNi58OQQOFoVv3 NWGZPF5QdT+571j5T0Xw5LhMgVZ17Id/VOsKlVm6+4onq3ew89RZjwniQOUvgqRTSMtC pK33Q0W/wg6U+IWYlUEOkpBkxJKtIln91jntCVxMbV8wOVUVVKYjRF1ISTjvwAcJiVwg zeKBDNTegVO9TF+f3g9JfHaiP6zXzIW7hcIwdtb4Fz5dV2aJ8X8qJIbODXzalRNaTPQr m+Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701286595; x=1701891395; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y9/J4Y1eGfIE6QZH+aeDmYtKYNS/5Wp/iuyIyrQ+tKI=; b=jUyTRHMHFDGfxCGiwqYBpldgn7UfgieETfJeZu4AeHBj8IthJoz7Dx7lM/FxWKhRm1 Hw/3Prpm9P8me3l32TKFb5xRKnIiO8iuWVfTmRe4F7etJfmPiogXS5EmwMtxK8boXzY5 vSveQNJTE46yGNQ5FV9YjvxV01zRiB9M2WKff/BG/Lnlg7KTMq0OMF/z+eFxWz503EpY JXkCc2s+idxj1gBKnHJk0z0xnPjuoB1QJlon+nwk8itees7Div88UTdhy9NJio/dh0WF dff8L6a67dbhsdsOHEOFbQMjw6MybM5D3JtFAMuqabsMjyQPG7+Kt+6xAkK349SvT6Ju DpFg== X-Gm-Message-State: AOJu0YzPKbXnKSYWVpy7F4re4l9mJZ89evz5vtINnlKANGId4jispADP w8b1nzIYErNKv8xv+vM9rxpzv20RcZD6Wg== X-Google-Smtp-Source: AGHT+IFuTFQoEbxYI042TjWeAE5IiszUKghFR5q82nvp5a65v+A0NsyA+r/tNRBUWaqYPPqF11swtw== X-Received: by 2002:a05:600c:1989:b0:405:82c0:d9d9 with SMTP id t9-20020a05600c198900b0040582c0d9d9mr11876453wmq.41.1701286594907; Wed, 29 Nov 2023 11:36:34 -0800 (PST) Received: from localhost.localdomain (cpc100856-bagu15-2-0-cust368.1-3.cable.virginm.net. [82.25.93.113]) by smtp.gmail.com with ESMTPSA id q17-20020a05600c46d100b0040836519dd9sm3239674wmo.25.2023.11.29.11.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 11:36:34 -0800 (PST) From: Sharlatan Hellseher Date: Wed, 29 Nov 2023 22:35:06 +0000 Message-ID: <4d20b22dad0e67876e94360706d22ff25af28497.1701297273.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <123a0b9b76c24c29184c527dabb652384f7be762.1701297273.git.sharlatanus@gmail.com> References: <123a0b9b76c24c29184c527dabb652384f7be762.1701297273.git.sharlatanus@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/golang.scm (go-github-com-bep-golibsass): Move from here... * gnu/packages/golang-web.scm: ...to here. Change-Id: I514ae05a8c04eea2084cbcb7e4d84c83b6b71bb4 --- gnu/packages/golang-web.scm | 61 ++++++++++++++++++++++++++++++++++++- gnu/packages/golang.scm | 58 ----------------------------------- 2 files changed, 60 insertions(+), 59 deletions(-) diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index 9aa3fe8233..72f2a7d84c 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2020 Oleg Pykhalov +;;; Copyright © 2020 Ryan Prior ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021, 2022 Efraim Flashner ;;; Copyright © 2022 Giacomo Leidi @@ -34,7 +35,8 @@ (define-module (gnu packages golang-web) #:use-module (guix git-download) #:use-module (gnu packages) #:use-module (gnu packages golang) - #:use-module (gnu packages golang-check)) + #:use-module (gnu packages golang-check) + #:use-module (gnu packages web)) ;;; Commentary: ;;; @@ -95,6 +97,63 @@ (define-public go-github-com-aymerick-douceur (description "This package provides a CSS parser and inliner.") (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 + (list 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))) + (define-public go-github-com-chris-ramon-douceur (package (name "go-github-com-chris-ramon-douceur") diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 89aeead50a..11032a6e7d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -10372,64 +10372,6 @@ (define-public go-github-com-gologme-log additions.") (license license:bsd-3)))) -(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 - (list 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))) - (define-public go-github-com-hashicorp-go-syslog (package (name "go-github-com-hashicorp-go-syslog")