help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I build a derivation with guix build?


From: divoplade
Subject: How do I build a derivation with guix build?
Date: Sat, 05 Sep 2020 22:15:57 +0200
User-agent: Evolution 3.34.2

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 via email to

[Prev in Thread] Current Thread [Next in Thread]