From patchwork Sat Mar 8 11:12:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Pisemsky X-Patchwork-Id: 39904 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 544EA27BBEA; Sat, 8 Mar 2025 11:14:27 +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=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS, URIBL_BLOCKED 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 72ED527BBE2 for ; Sat, 8 Mar 2025 11:14:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tqs89-0002gh-Cd; Sat, 08 Mar 2025 06:14:09 -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 1tqs83-0002gP-6b for guix-patches@gnu.org; Sat, 08 Mar 2025 06:14:05 -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 1tqs82-0003li-MN for guix-patches@gnu.org; Sat, 08 Mar 2025 06:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=T+11hdxG6W7gCytlsLXHPJUz84KgOwdC9cIIicx5TY4=; b=GezWWE6k4utcdK2R/Vojlt+fjvKiaIUMCXsrgChXifYyDb5aIhwXqiNL9u/J8MgPsd+wQIBN0YCx0/pYFDKYzirOR1OBVj5diwZ8pYHnop50fwXcXz/dI2YJA4IRE+KdH+1IoGGmFOoj9buzX4Eg16T8S6GytVnZ4LPpYmNBFwSWsKyS0EMgmQ4sNRWZ6gpaGa1p+CEhGSPultfJ9mfXZTswhpiDEX7UDPWDbiCN4ji/r9SJiHplexBcaNuL3DUUWHL5h1vIGYMa3CPDFHPdF5DRWQtpUZGnjwmxi0ESq3K4hOkNcBiWY6FJZp87DDqNTQUILOQ2aaLaT7yvzA34EA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tqs82-00043v-6d for guix-patches@gnu.org; Sat, 08 Mar 2025 06:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#76863] [PATCH] gnu: guile-libyaml: Improve packaging. Resent-From: Evgeny Pisemsky Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 08 Mar 2025 11:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 76863 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 76863@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.174143239215519 (code B ref -1); Sat, 08 Mar 2025 11:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 8 Mar 2025 11:13:12 +0000 Received: from localhost ([127.0.0.1]:53109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tqs7D-00042F-TJ for submit@debbugs.gnu.org; Sat, 08 Mar 2025 06:13:12 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39448) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tqs7C-00041o-6O for submit@debbugs.gnu.org; Sat, 08 Mar 2025 06:13:10 -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 1tqs74-0002cI-0R for guix-patches@gnu.org; Sat, 08 Mar 2025 06:13:02 -0500 Received: from pisemsky.site ([103.54.19.55]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tqs71-0002sc-SB for guix-patches@gnu.org; Sat, 08 Mar 2025 06:13:01 -0500 Received: from localhost.localdomain ( [212.233.86.238]) by pisemsky.site (OpenSMTPD) with ESMTPSA id 36523d0c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 8 Mar 2025 11:12:44 +0000 (UTC) From: Evgeny Pisemsky Date: Sat, 8 Mar 2025 14:12:24 +0300 Message-ID: X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 Received-SPF: pass client-ip=103.54.19.55; envelope-from=mail@pisemsky.site; helo=pisemsky.site X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_PBL=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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/guile-xyz.scm (guile-libyaml): Run guix style. [version]: Specify semantic version. [source]: Use version tag, add deletion snippet. [build-system]: Use guile-build-system. [arguments]: Use gexps, clean up phases, disable auto compile. [native-inputs]: Add gcc, guile-3.0, nyacc. [inputs]: Remove guile-3.0. Change-Id: Id064f0cde60606a8f2bad8c903e840a9fa50376d --- gnu/packages/guile-xyz.scm | 88 ++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 51 deletions(-) base-commit: 42bc94adbd1114771ef14a8e19563829ae355e87 diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index e220f897ad..cc74591604 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -88,6 +88,7 @@ (define-module (gnu packages guile-xyz) #:use-module (gnu packages emacs) #:use-module (gnu packages emacs-xyz) #:use-module (gnu packages gawk) + #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) #:use-module (gnu packages gl) #:use-module (gnu packages glib) @@ -6218,57 +6219,42 @@ (define-public guile-drmaa (license license:gpl3+))) (define-public guile-libyaml - (let ((commit "2bdacb72a65ab63264b2edc9dac9692df7ec9b3e") - (revision "2")) - (package - (name "guile-libyaml") - (version (git-version "0" revision commit)) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/mwette/guile-libyaml") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1bssby1ri1vjll2rvi8b33xr2ghwjyxsd4yc15najj3h8n2ss87i")))) - (build-system gnu-build-system) - (arguments - `(#:modules (((guix build guile-build-system) - #:prefix guile:) - ,@%default-gnu-modules) - #:imported-modules ((guix build guile-build-system) - ,@%default-gnu-imported-modules) - #:tests? #false ; there are none - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'remove-unused-files - (lambda* (#:key inputs #:allow-other-keys) - (for-each delete-file '("guix.scm" "demo1.yml" "demo1.scm")))) - (add-before 'build 'build-ffi - (lambda* (#:key inputs #:allow-other-keys) - (invoke "guild" "compile-ffi" - "--no-exec" ; allow us to patch the generated file - "yaml/libyaml.ffi") - (substitute* "yaml/libyaml.scm" - (("dynamic-link \"libyaml\"") - (format #false "dynamic-link \"~a/lib/libyaml\"" - (assoc-ref inputs "libyaml")))))) - (replace 'build - (assoc-ref guile:%standard-phases 'build)) - (delete 'install)))) - (inputs - (list guile-3.0 libyaml)) - (propagated-inputs - (list guile-bytestructures nyacc)) - (home-page "https://github.com/mwette/guile-libyaml") - (synopsis "Guile wrapper for libyaml") - (description - "This package provides a simple yaml module for Guile using the -ffi-helper from nyacc.") - (license license:lgpl3+)))) + (package + (name "guile-libyaml") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mwette/guile-libyaml") + (commit (string-append "V" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1bssby1ri1vjll2rvi8b33xr2ghwjyxsd4yc15najj3h8n2ss87i")) + (snippet #~(for-each delete-file + '("guix.scm" "demo1.yml" "demo1.scm"))))) + (build-system guile-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'build-ffi + (lambda* (#:key inputs #:allow-other-keys) + (setenv "GUILE_AUTO_COMPILE" "0") + (invoke "guild" "compile-ffi" "--no-exec" "yaml/libyaml.ffi") + (substitute* "yaml/libyaml.scm" + (("dynamic-link \"libyaml\"") + (format #f "dynamic-link \"~a/lib/libyaml\"" + (assoc-ref inputs "libyaml"))))))))) + (native-inputs (list gcc guile-3.0 nyacc)) + (inputs (list libyaml)) + (propagated-inputs (list guile-bytestructures nyacc)) + (home-page "https://github.com/mwette/guile-libyaml") + (synopsis "Guile wrapper for libyaml") + (description + "This package provides a simple yaml module for Guile using the ffi-helper from +nyacc.") + (license license:lgpl3+))) (define-public schmutz (let ((commit "f8043e6c258d2e29d153bc37cb17b130fee0579f")