From patchwork Wed Jan 18 18:20:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Luis Felipe X-Patchwork-Id: 46275 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 4C57D27BBEB; Wed, 18 Jan 2023 18:21:45 +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=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, 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 0695E27BBE9 for ; Wed, 18 Jan 2023 18:21:44 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pID3Z-0008MT-Lk; Wed, 18 Jan 2023 13:21:06 -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 1pID3X-0008M5-8x for guix-patches@gnu.org; Wed, 18 Jan 2023 13:21:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pID3W-0001ax-JE for guix-patches@gnu.org; Wed, 18 Jan 2023 13:21:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pID3W-000646-5H for guix-patches@gnu.org; Wed, 18 Jan 2023 13:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60386] [PATCH] gnu: Add guile-proba. Resent-From: Luis Felipe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 18 Jan 2023 18:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60386 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?utf-8?q?Court=C3=A8s?= Cc: 60386@debbugs.gnu.org Received: via spool by 60386-submit@debbugs.gnu.org id=B60386.167406602123254 (code B ref 60386); Wed, 18 Jan 2023 18:21:02 +0000 Received: (at 60386) by debbugs.gnu.org; 18 Jan 2023 18:20:21 +0000 Received: from localhost ([127.0.0.1]:41768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pID2r-000630-86 for submit@debbugs.gnu.org; Wed, 18 Jan 2023 13:20:21 -0500 Received: from mail-4319.protonmail.ch ([185.70.43.19]:41427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pID2p-00062g-5v for 60386@debbugs.gnu.org; Wed, 18 Jan 2023 13:20:20 -0500 Date: Wed, 18 Jan 2023 18:20:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1674066013; x=1674325213; bh=GXhMmGTklDPf9Oy3QXHPhkD85xZ2sBjDtUL8cXN5CFQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=psdStJj42XJoIAtxVs0GkwDjwhkQR5gKyyo0KOyhg7cZpkfIZwgM9aoTykY+B5wGD 5BEzyV+JA8/OV8F3ZpVZO6A44WCGGm3nbdn1T95zy27wNOLqjmtC/Ak+gMcX3boBMX v42wmCoGRcg+iXUGr6lNZclWGo2kJwylLqkIWwjdRGcyvwS0a8mEI2O2rsT/2pE8lb Dtigsuc9BxPfJODIgG+gygdJ2AobUlA8QSUQEwdH2WAmt0hNPFYKsbnlQjkibC/VSC jmUru3+iuPQdWSms7mTDshci/x2wIkm/JfR8EhO0RklUI+1ZIVVe/QC4m2KDooSnYS WZpkv6qSgAdEA== Message-ID: <0R2fGew0iuJD4YBAaHVjCshZMF52BTBE0WeK7DfiPAO5ebcSRE6PWiix30uJUY35OigiDykEQF_ZpjNc18IoQatNgRXsz4_cx6oMriFDo8M=@protonmail.com> In-Reply-To: <87edrti82j.fsf@gnu.org> References: <87358ioeb6.fsf@gnu.org> <87edrti82j.fsf@gnu.org> Feedback-ID: 24022468:user:proton 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: , Reply-to: Luis Felipe X-ACL-Warn: , Luis Felipe via Guix-patches X-Patchwork-Original-From: Luis Felipe via Guix-patches via From: Luis Felipe 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 On Tuesday, January 17th, 2023 at 13:50, Ludovic Courtès wrote: > Check out the section on search paths (info "(guix) Search Paths"). > > In essence, INFOPATH won’t be set if you don’t have an Info reader > (‘info-reader’ or ‘emacs’) in the profile, because then you’d have no > way to read the Info file. Yet, you shouldn’t force a specific Info > reader on the user via ‘propagated-inputs’. > > The story is similar for ‘guile-3.0’. Here, you should wrap or modify > the ‘proba’ script such that it automatically adds its own > $PKG/share/guile/site/3.0 to its .scm search path (and likewise for .go > files). > > See for example the ‘mcron’ or ‘shepherd’ script of the same-named > packages, or see the ‘wrap-guilescript’ phase of the ‘guilescript’ > package. Thanks. I attach a new patch where guile and texinfo are not propagated, and the script is wrapped. From 4fd946321742e19a44b93e4d6d03fd09e92f70ba Mon Sep 17 00:00:00 2001 From: Luis Felipe Date: Wed, 28 Dec 2022 12:45:32 -0500 Subject: [PATCH] gnu: Add guile-proba. * gnu/packages/check.scm (guile-proba): New variable. --- gnu/packages/check.scm | 63 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index aaa41777dc..753d3f597d 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -41,6 +41,7 @@ ;;; Copyright © 2022 David Elsing ;;; Copyright © 2022 Sharlatan Hellseher ;;; Copyright © 2022 jgart +;;; Copyright © 2022 Luis Felipe López Acevedo ;;; ;;; This file is part of GNU Guix. ;;; @@ -70,6 +71,8 @@ (define-module (gnu packages check) #:use-module (gnu packages gnome) #:use-module (gnu packages golang) #:use-module (gnu packages gtk) + #:use-module (gnu packages guile) + #:use-module (gnu packages guile-xyz) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -78,6 +81,7 @@ (define-module (gnu packages check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-science) + #:use-module (gnu packages texinfo) #:use-module (gnu packages time) #:use-module (gnu packages xml) #:use-module (guix utils) @@ -90,6 +94,7 @@ (define-module (gnu packages check) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) #:use-module (guix build-system go) + #:use-module (guix build-system guile) #:use-module (guix build-system meson) #:use-module (guix build-system pyproject) #:use-module (guix build-system python) @@ -3455,3 +3460,61 @@ (define-public python-pytest-regressions tables by saving expected data in a data directory (courtesy of pytest-datadir) that can be used to verify that future runs produce the same data.") (license license:expat))) + +(define-public guile-proba + (package + (name "guile-proba") + (version "0.2.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://codeberg.org/luis-felipe/guile-proba") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04si01wzhc9c8rqy9vr12fpkf8gnlx7crkph8djy80s2c7b1lvr7")))) + (build-system guile-build-system) + (inputs (list bash-minimal)) + (native-inputs (list guile-3.0 texinfo)) + (propagated-inputs (list guile-config guile-lib)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'build 'check + (lambda _ + (invoke "guile" "proba.scm" "run" "tests"))) + (add-after 'install 'install-wrapped-script + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (version (target-guile-effective-version)) + (scm (string-append "/share/guile/site/" version)) + (go (string-append "/lib/guile/" version "/site-ccache")) + (bin-dir (string-append out "/bin")) + (script (string-append bin-dir "/proba"))) + (mkdir-p bin-dir) + (copy-file "proba.scm" script) + (chmod script #o555) + (wrap-program script + `("GUILE_LOAD_PATH" prefix + (,(string-append out scm))) + `("GUILE_LOAD_COMPILED_PATH" prefix + (,(string-append out go))))))) + (add-after 'install 'install-manual + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (info-dir (string-append out "/share/info"))) + (mkdir-p info-dir) + (invoke "makeinfo" "manual/main.texi") + (install-file "guile-proba" info-dir))))) + #:not-compiled-file-regexp + "((packages|tests)\\/.*.scm|(proba|manifest).scm)$")) + (home-page "https://luis-felipe.gitlab.io/guile-proba/") + (synopsis "Testing tools for GNU Guile projects with SRFI 64 test suites") + (description + "This software is a set of testing tools for GNU Guile projects +with SRFI 64-based test suites. It comes with a command-line interface +to run test collections, and a library that includes a test runner and +helpers for writing tests.") + (license license:public-domain))) base-commit: fc5dc3e04789a15d80a7b35987adaefc1a94b97c -- 2.38.1