[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guix can't build my dummy package definition
From: |
Julien Lepiller |
Subject: |
Re: Guix can't build my dummy package definition |
Date: |
Sun, 01 Mar 2020 09:50:28 -0500 |
User-agent: |
K-9 Mail for Android |
Le 1 mars 2020 07:58:27 GMT-05:00, "Jérémy Korwin-Zmijowski" <address@hidden> a
écrit :
>Hey Guixters !
>
>I am experimenting one way to learn how to use Guix for packaging.
>
>I've a package dummy definition in /tmp/def.scm:
>
>(use-modules
> (guix packages)
> (guix build-system emacs)
> (guix licenses)
> (guix git-download))
>
>(define-public ac-geiser
> (package
> (name "")
> (version "")
> (source
> (origin
> (uri
> (git-reference (url "")
> (commit "")))
> (method git-fetch)
> (sha256 (base32 ""))))
> (build-system emacs-build-system)
> (synopsis "")
> (description "")
> (license bsd-3)
> (home-page "")))
>
>Then when I do :
>
>./pre-inst-env guix build -f /tmp/def.scm
>
>I get :
>
>guix build: error: #<unspecified>: not something we can build
>
>What is Guix trying to tell yo me ? I have no clue...
>
>Does anybody have one ?
>
>Cheers
I knew it was going to happen :)
That message is indeed not very helpful. Internally, guix evaluates the file
and uses its return value (the value the last expression evaluates to). Here,
your last expression is a define-public which does not return any value (in
other languages, it's called unit or void, in guile it's #<unspecified>). The
solution is to make sure your last expression evaluates to a package object.
Three solutions:
1. Add a new line on which you put the name of the variable you define, so it
evaluates to its content, the package object.
2. Do not wrap the package definition in a define-public, but use package
directly, so that it evaluates to a package expression directly.
3. Define your file as a module, and use -L to add it to load path. Then guix
will be able to necognise all your packages in that file by their name, instead
of only the last one (ex: guix build -L . ac-geiser), although your package has
no name yet, so it can't be found by guix that way currently.