unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: guix-devel@gnu.org
Subject: Problems when trying to install a package via guile API
Date: Wed, 13 Aug 2014 22:44:49 -0400	[thread overview]
Message-ID: <87zjf7iyce.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)

Hello all,

I'm trying to learn to use the Guix API to install packages so that I
can write a web frontend.  However, I'm running into issues when trying
to create a derivation.

Here's a problematic code snippet:

(use-modules (guix derivations)
             (guix monads)
             (guix packages)
             (guix profiles)
             (guix store)
             (gnu packages guile))

(define %store (open-connection))
(define profile "/usr/var/guix/profiles/per-user/dave/guix-profile")
(define manifest (profile-manifest profile))
(define new (manifest-add manifest
                          (list (package->manifest-entry guile-2.0))))
(define prof-drv (run-with-store %store
                   (profile-derivation new)))

The error:

ERROR: In procedure #<syntax-transformer derivation?>:
ERROR: Wrong type to apply: #<syntax-transformer derivation?>

           0 (#<syntax-transformer derivation?> #<derivation /gnu/store/mq7cx62…>)

I've been slowly figuring things out by reading
guix/scripts/package.scm, but I can't seem to get this part right.  Does
anyone have an idea of what I'm doing wrong?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

             reply	other threads:[~2014-08-14  2:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14  2:44 David Thompson [this message]
2014-08-14  4:46 ` Problems when trying to install a package via guile API Alex Kost
2014-08-16  9:32 ` Ludovic Courtès
2014-08-18 15:13   ` Mark H Weaver
2014-08-18 15:17     ` Thompson, David

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=87zjf7iyce.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
    --to=dthompson2@worcester.edu \
    --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).