From patchwork Wed Nov 8 00:41:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 56071 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 6E76D27BBE2; Tue, 7 Nov 2023 21:47:07 +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=unavailable 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 4684927BBEA for ; Tue, 7 Nov 2023 21:47:03 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0Ts3-00027x-KJ; Tue, 07 Nov 2023 16:44:27 -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 1r0TrF-0001Fe-UR for guix-patches@gnu.org; Tue, 07 Nov 2023 16:43:38 -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 1r0TrF-0007gB-KT for guix-patches@gnu.org; Tue, 07 Nov 2023 16:43:37 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0Trr-0000gf-Og for guix-patches@gnu.org; Tue, 07 Nov 2023 16:44:15 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#66827] [PATCH 28/67] gnu: go-github-com-bep-golibsass: Move to (gnu packages golang-web). Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 07 Nov 2023 21:44:15 +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 Received: via spool by 66827-submit@debbugs.gnu.org id=B66827.16993934162177 (code B ref 66827); Tue, 07 Nov 2023 21:44:15 +0000 Received: (at 66827) by debbugs.gnu.org; 7 Nov 2023 21:43:36 +0000 Received: from localhost ([127.0.0.1]:43547 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0TrD-0000Yo-2d for submit@debbugs.gnu.org; Tue, 07 Nov 2023 16:43:35 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:50391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0Tqy-0000Th-5C for 66827@debbugs.gnu.org; Tue, 07 Nov 2023 16:43:21 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40790b0a224so45983065e9.0 for <66827@debbugs.gnu.org>; Tue, 07 Nov 2023 13:42:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699393356; x=1699998156; 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=k60CKrZRg+CO0yAyyPkPkXeH7QMqPYv/8HtgeM3SMYg=; b=OKfa3OSHbJqainuxH1LRRlZ7n5BFYTW8/N4qoUgSuhLZocMODwLFrT4oT17KebcA51 ZhGGSb35diDqbxCnKYOmdUO6zFswjPJ9+WuNsCF1MQTFG5QMhNM8Oub1E+L/HoRsETtG fGvXjBadq2FYYlpDHGK93ZL5R/y9EA101qryh4ZfKSsFo2VuaE9BTuAEmAuXAsEVPV7r RN27qzIBX2JpEMJOpeYUriLwe3L3fEg4yQA3IayQL+z1n0+grLoxClaKUVKIuJlATs/W DLr4rwtG2aCenJqOJsy30H7mqb0XIBNB7XIkMfu93xUWAS4RahpBum+oMMeje3Lld76U xK5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699393356; x=1699998156; 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=k60CKrZRg+CO0yAyyPkPkXeH7QMqPYv/8HtgeM3SMYg=; b=qCVm5/ywOHuNur7ClPEkADjtwcCgQBSfAfr/L2E5eRNbAIf0Jyi07+uy/c6qRsHbOc h3d3I3ZKtgg3Mr0imEiJj02b3WH1MFYWhLN1uBAqFFCpIrFzOU/0rmdd+4a9nCkgCw3T VObWngs3Co7eLWtheaILslkX8qG1KfDw/pJ8kCbWTB8THjYOrQXp76qaL1zAcGNBXwL7 scXKp+J3kfqTa+WMxpBJt5UCw3ksiYwv56NDQeGYIPe1nHidHeKSiA3CdYfn7153sjDu EMnjqGvmge3tpNaVsdkIUxPfi2FXeG8fBZXgsJpvDBoWO9fI84X+HR6yTLxMJsmD0kF8 Ry3w== X-Gm-Message-State: AOJu0YzOpOpCMRt3oGU0U09JN5wec3sH5GEYbZu8vmlvuOS8nmvQFTrm OHzlBWrg3zL5GAtfMWdl1JqGIHsob67rMg== X-Google-Smtp-Source: AGHT+IGwdh6QCCszEbY1RN0h08wvbRbOYPjFsCCHGJkZ9lsVwgcrezJs7uahf1JZrtejvICJe08Hrw== X-Received: by 2002:a05:6000:2c3:b0:32d:8401:404a with SMTP id o3-20020a05600002c300b0032d8401404amr41547wry.10.1699393356115; Tue, 07 Nov 2023 13:42:36 -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 p2-20020adfce02000000b0032f9688ea48sm3310178wrn.10.2023.11.07.13.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Nov 2023 13:42:35 -0800 (PST) From: Sharlatan Hellseher Date: Wed, 8 Nov 2023 00:41:05 +0000 Message-ID: <60079baea01b842771d61ef1f5f055bd31e2f9b8.1699403992.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <0117df90b1ef43a67d4fa86e5b58e60f7c0a52e5.1699403992.git.sharlatanus@gmail.com> References: <0117df90b1ef43a67d4fa86e5b58e60f7c0a52e5.1699403992.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 92f3f90d36..e7316f9923 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -10245,64 +10245,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")