all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: Vincent Legoll <vincent.legoll@gmail.com>,
	Charles Direg <carloshujara@gmail.com>,
	help-guix <help-guix@gnu.org>
Subject: Re: How to compile native?
Date: Wed, 14 Apr 2021 21:18:28 +0200	[thread overview]
Message-ID: <87o8eghdyz.fsf@yoctocell.xyz> (raw)
In-Reply-To: <CAEwRq=r7P_PEJDmSe3r2mB+OS+8zLF=Z-of+TwVxX6H4zTB2Mg@mail.gmail.com>

On Wed, Apr 14 2021, Vincent Legoll wrote:

>> If you wanted to compile packages with specific compile flags, then
>> you'll need to make custom package definitions.
>
> That's probably what Charles wants, but in a global way, settings
> CFLAGS once for the whole distro.

The manual mentions the ‘package-input-rewriting’ procedure in section
“8.3 Defining Package Variants”.  I guess you could write something like
this in a manifest file:

--8<---------------cut here---------------start------------->8---
(define custom-package
  (package
    (inherit some-package)
    ...))
    
(define package-custom-cflags
  ;; This is a procedure to replace SOME-PACKAGE by CUSTOM-PACKAGE
  ;; recursively.
  (package-input-rewriting `((,some-package . ,custom-package))))

(packages->manifest
  (map package-custom-cflags (list package1 package2 ...)))
--8<---------------cut here---------------end--------------->8---

Totally untested though.



      reply	other threads:[~2021-04-14 19:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 23:10 How to compile native? Charles Direg
2021-04-14 18:31 ` Joshua Branson
2021-04-14 18:45   ` Vincent Legoll
2021-04-14 19:18     ` Xinglu Chen [this message]

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=87o8eghdyz.fsf@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=carloshujara@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=vincent.legoll@gmail.com \
    /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.