all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timothy Sample <samplet@ngyro.com>
To: "Pierre-Henry F." <contact@phfrohring.com>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: Help defining a trivial package.
Date: Sun, 25 Aug 2019 08:17:37 -0400	[thread overview]
Message-ID: <87sgppfnha.fsf@ngyro.com> (raw)
In-Reply-To: <bTBKn8S-ww9thTM-ZmWx7SRJYaa807c5LAenENohKLQtf11L7jd-aGti4rpYnEnYUGhE8UhoMP5-mjtQceD97oEOkHuXfyfZ2j_v63v6aaA=@phfrohring.com> (Pierre-Henry F.'s message of "Fri, 23 Aug 2019 19:42:56 +0000")

Hi Pierre,

"Pierre-Henry F." <contact@phfrohring.com> writes:

> Would someone help defining a trivial package?

Sure!

> Here is an attempt at defining the package (incomplete, does not work) in blog.scm:
>
>     (define-module (blog)
>       #:use-module (guix packages)
>       #:use-module (guix download)
>       #:use-module (guix build-system trivial)
>       #:use-module (guix licenses)
>       #:use-module (gnu packages python))
>
>     (define-public blog
>       (package
>         (name "blog")
>         (version "3")
>         (source
>           (origin
>             (method url-fetch)
>             (uri (string-append "/home/phf/programs/blog/release_" version ".tar.lz"))
>             (sha256
>               (base32
>                 "1y819b53ksyas6asldysr0r8p73n5i8ipbpmbgjrfx8qz8cy2zsx"))))
>         (build-system trivial-build-system)
>         (arguments
>           '(#:builder #~(begin
>                           (mkdir #$output)
>                           (chdir #$output)
>                           ...
>                           )))
>         (inputs `(("python" ,python)))
>         (synopsis "Guix 'hello world' to learn about Guix")
>         (license gpl3+)))
>
> Here is the line that I use to try to build and debug along the way:
>
>     $ guix build --keep-failed --verbosity=2 --file=./blog.scm
>

As a note for the future, it would be helpful to include the error
message that you saw when things went wrong.  Here, I’m assuming that
Guix said:

    guix build: error: #<unspecified>: not something we can build

Running “guix build --file=X” causes Guix to build the last expression
evaluated in the file “X”.  In your case, the last expression that gets
evaluated is the “define-public” form, which returns an unspecified
value.

While testing, you can put “blog” at the bottom of the file, causing
Guix to build your defined “blog” package.

Hope that helps!


-- Tim

  reply	other threads:[~2019-08-25 12:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 19:42 Help defining a trivial package Pierre-Henry F.
2019-08-25 12:17 ` Timothy Sample [this message]
2019-08-29 11:23   ` Pierre-Henry F.
2019-08-29 15:26     ` Timothy Sample
     [not found]       ` <Al-P-mUDUQnoUvF4kgNS_NeITvHjEDEvxG8Gmk9aMiXX2FTUfL0lbZAq5h4m54GIGNXPwM271CzLWwt5sgOt1JI6Z1wxqxSwWmpnPHu7I5A=@phfrohring.com>
2019-09-03  1:58         ` Timothy Sample
2019-09-04 11:21           ` Pierre-Henry F.
2019-09-04 17:34             ` Timothy Sample

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=87sgppfnha.fsf@ngyro.com \
    --to=samplet@ngyro.com \
    --cc=contact@phfrohring.com \
    --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.
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.