all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: "Sergio Pastor Pérez" <sergio.pastorperez@outlook.es>
Cc: 65012@debbugs.gnu.org
Subject: [bug#65012] [PATCH] gnu: Add picket.
Date: Mon, 11 Sep 2023 23:50:41 +0200	[thread overview]
Message-ID: <87sf7kpefi.fsf_-_@gnu.org> (raw)
In-Reply-To: <DU2P193MB2132CB79EDEB821C8C1C583FF3F3A@DU2P193MB2132.EURP193.PROD.OUTLOOK.COM> ("Sergio Pastor Pérez"'s message of "Sun, 10 Sep 2023 17:42:05 +0200")

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Sergio Pastor Pérez <sergio.pastorperez@outlook.es> 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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 2754 bytes --]

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

  reply	other threads:[~2023-09-11 21:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 11:29 [bug#65012] [PATCH] gnu: Add picket Sergio Pastor Pérez
2023-08-02 13:42 ` Jean Pierre De Jesus DIAZ via Guix-patches via
2023-09-10 15:42   ` [bug#65012] Extract mINI library from Picket package Sergio Pastor Pérez
2023-09-10 15:42   ` [bug#65012] [PATCH v2 1/2] gnu: Add mini Sergio Pastor Pérez
2023-09-11 21:50     ` Ludovic Courtès [this message]
2023-09-10 15:42   ` [bug#65012] [PATCH v2 2/2] gnu: Add picket Sergio Pastor Pérez
2023-09-11 21:44     ` [bug#65012] [PATCH] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sf7kpefi.fsf_-_@gnu.org \
    --to=ludo@gnu.org \
    --cc=65012@debbugs.gnu.org \
    --cc=sergio.pastorperez@outlook.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.