unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Problems when trying to install a package via guile API
@ 2014-08-14  2:44 David Thompson
  2014-08-14  4:46 ` Alex Kost
  2014-08-16  9:32 ` Ludovic Courtès
  0 siblings, 2 replies; 5+ messages in thread
From: David Thompson @ 2014-08-14  2:44 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-18 15:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-14  2:44 Problems when trying to install a package via guile API David Thompson
2014-08-14  4:46 ` 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

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).