From patchwork Mon Sep 11 21:50:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 53744 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 2BD6627BBE9; Mon, 11 Sep 2023 22:51:09 +0100 (BST) 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_INVALID, DKIM_SIGNED,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 8D30C27BBE2 for ; Mon, 11 Sep 2023 22:51:05 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qfooB-0007jn-Ka; Mon, 11 Sep 2023 17:51:03 -0400 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 1qfoo7-0007jD-9L for guix-patches@gnu.org; Mon, 11 Sep 2023 17:51:00 -0400 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 1qfoo5-0004fK-VZ for guix-patches@gnu.org; Mon, 11 Sep 2023 17:50:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qfooA-0006OC-5o for guix-patches@gnu.org; Mon, 11 Sep 2023 17:51:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65012] [PATCH] gnu: Add picket. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Sep 2023 21:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65012 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sergio Pastor =?utf-8?b?UMOpcmV6?= Cc: 65012@debbugs.gnu.org Received: via spool by 65012-submit@debbugs.gnu.org id=B65012.169446905624546 (code B ref 65012); Mon, 11 Sep 2023 21:51:02 +0000 Received: (at 65012) by debbugs.gnu.org; 11 Sep 2023 21:50:56 +0000 Received: from localhost ([127.0.0.1]:55011 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfoo3-0006Np-PO for submit@debbugs.gnu.org; Mon, 11 Sep 2023 17:50:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qfoo1-0006NY-9U for 65012@debbugs.gnu.org; Mon, 11 Sep 2023 17:50:54 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qfonr-0004e6-C0; Mon, 11 Sep 2023 17:50:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Ki+aPR2gV71fjhf5NXDFcdYLW/oL3nC/OvDWk79DBno=; b=q1x6U3SoYqIbxLscw0Om Pe8jScU/WaY2A7LWgYA3s8am/OqAYKmZj0OJ9zOs0Ty/9PqeyO7PwBgd73mjx1Il+k78Xjoz5h2YB 9gRZHoaKKme1oDow5Ifc3ZWAH8ZFYjHm69AbqO+ZLjNADBL1fBE21u27h52MYks9KZKoRyFNUiY8p L+xpzdKjga12vD3bdkVLIc6FP+B/q+C5Y1mgmHsDIqq0x9bs31CsZ9aVWpJ0GqLoZGmdtAn4HR/Za A7SfeviUAF3I//G5Amfje4Kf8jLc4XPur0Il0D5B1E+h828lO4cHk7QG15R7g24f1QlDKNBd0Zwh5 fgTNN+YBNxU8bg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= References: Date: Mon, 11 Sep 2023 23:50:41 +0200 In-Reply-To: ("Sergio Pastor =?utf-8?b?UMOpcmV6?= "'s message of "Sun, 10 Sep 2023 17:42:05 +0200") Message-ID: <87sf7kpefi.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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 Sergio Pastor Pérez skribis: > * gnu/packages/image.scm (mini): New variable. > --- > This patch bundles the mINI header library. This library includes a series of > tests which have g++, linux-header, and a few other dependencies that get > satisfied with `gcc-toolchain'. For an unknown reason adding the module `gnu > packages commencement` breaks Guile. This patches have been tested under > `GUIX_PACKAGE_PATH` successfully. Also, adding this package definition under a > module which already includes the commencement module does not present the > issue. > > For this reason I submit this 2 patches as a proposal. Any further info > regarding the issue described would be appreciated. As you found out, the (gnu packages commencement) module cannot be imported directly. The solution here is to use ‘gnu-build-system’, which has GCC & co. as implicit inputs, and adjust the relevant phases. I made the change below and applied this patch. Thanks! Ludo’. diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 4332a7ead8..403409975a 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -68,7 +68,6 @@ (define-module (gnu packages image) #:use-module (gnu packages cpp) #:use-module (gnu packages curl) #:use-module (gnu packages compression) - #:use-module (gnu packages commencement) #:use-module (gnu packages documentation) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) @@ -1945,24 +1944,30 @@ (define-public mini (sha256 (base32 "01wn7h9rjz9h6cr11dd62jsb3315d1h6c33pdmwi2l7d8a4n3h8d")))) - (build-system copy-build-system) + (build-system gnu-build-system) (arguments - (list #:install-plan ''(("src/mini/ini.h" "include/mini/ini.h")) - #:phases #~(modify-phases %standard-phases - (add-before 'install 'check - (lambda _ - (with-directory-excursion "tests" - (for-each (lambda (test) - (let ((test-name (basename test - ".cpp"))) - (invoke "./build.sh" test-name) - (invoke "./run.sh" test-name))) - (find-files "." ".cpp")))))))) - (native-inputs (list gcc-toolchain)) + (list #:phases + #~(modify-phases %standard-phases + (delete 'build) + (delete 'configure) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (with-directory-excursion "tests" + (for-each (lambda (test) + (let ((test-name (basename test + ".cpp"))) + (invoke "./build.sh" test-name) + (invoke "./run.sh" test-name))) + (find-files "." ".cpp")))))) + (replace 'install + (lambda _ + (install-file "src/mini/ini.h" + (string-append #$output "/include/mini"))))))) (home-page "https://github.com/pulzed/mINI") (synopsis "INI file reader and writer header library") (description - "This is a tiny, header only C++ library for manipulating INI files.") + "This is a tiny, header-only C++ library for manipulating INI files.") (license license:expat))) (define-public picket