unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Christopher Rodriguez <cdr255@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: A Few Packaging Questions
Date: Sun, 07 Aug 2022 23:02:10 +0200	[thread overview]
Message-ID: <87bksvbwdp.fsf@gnu.org> (raw)
In-Reply-To: <875yj75r6t.fsf@gmail.com> (Christopher Rodriguez's message of "Thu, 04 Aug 2022 22:50:47 -0400")

Hi Christopher,

Christopher Rodriguez <cdr255@gmail.com> skribis:

> Hello All,
>
> 1. Is there a way to call non-exported procedures from a module in
> Guile?

In general this is not recommended (if it’s private, it’s for a reason;
plus the compiler might choose to inline the procedure at its call
site(s), in which case it doesn’t exist as such at run time), but if you
really have to, you can use @@ to get at a procedure, as in:

  (@@ (guix build ant-build-system) strip-jar-timestamps)

> 2. Is there a list of variables accessible using gexps somewhere, or
> some source code I might be able to glean the same information from?
>
> I have just discovered #$output as a somewhat useful tool, and I'm
> currently looking to learn more ahead of when I might need them.

#$output is an exception, a trick to refer to the output of the
derivation in which the gexp appears.

Other than that, you can think of #$ as ‘unquote’ in regular
Lisp/Scheme.

> 3. What is the canonical way in the new input system to reference a
> specific output of a package?

You’d write a list, like: (list guile-3.0 guile-json).

Check out
<https://guix.gnu.org/manual/devel/en/html_node/Defining-Packages.html>
and related parts of the manual, and see
<https://guix.gnu.org/en/blog/2021/the-big-change/> for a longer
discussion.

> label 'openjdk' does not match package name 'openjdk:jdk'

You can ignore that; we should fix that ‘guix lint’ warning: it was
helpful with “old-style” inputs, but it wrongfully flags new-style
inputs, as in the example you give.

HTH!

Ludo’.


      parent reply	other threads:[~2022-08-07 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05  2:50 A Few Packaging Questions Christopher Rodriguez
2022-08-05 16:35 ` Csepp
2022-08-07 21:02 ` Ludovic Courtès [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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87bksvbwdp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=cdr255@gmail.com \
    --cc=guix-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).