unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: divoplade <d@divoplade.fr>
To: help-guix@gnu.org
Subject: How do I build a derivation with guix build?
Date: Sat, 05 Sep 2020 22:15:57 +0200	[thread overview]
Message-ID: <908fa63077ee6cfe3174596099da22699d432e77.camel@divoplade.fr> (raw)

Hello,

I am still learning how to use gexps, and I thought that running this
would work:

guix build -f example.scm

with example.scm containing:

(use-modules (gnu packages base))
(use-modules (guix gexp))

(define build-exp
  #~(begin
      (mkdir #$output)
      (chdir #$output)
      (symlink (string-append #$coreutils "/bin/ls")
               "list-files")))

(gexp->derivation "the-thing" build-exp)

This is a copy of what's on the manual for explaining G-expressions.

The guix build -f command should, according to the --help output:
"build the package or derivation that the code within FILE evaluates
to"

However, I get an exception, "Wrong number of arguments to #<procedure
7f775f854f00 at guix/gexp.scm:1064:2 (state)>", after a backtrace that
does not even contains example.scm.

What is going on? How do you build the derivation?

Best regards,

divoplade



             reply	other threads:[~2020-09-05 20:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-05 20:15 divoplade [this message]
2020-09-06  2:40 ` How do I build a derivation with guix build? Timothy Sample
2020-09-06  9:02   ` divoplade

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=908fa63077ee6cfe3174596099da22699d432e77.camel@divoplade.fr \
    --to=d@divoplade.fr \
    --cc=help-guix@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.
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).