guix-devel
[Top][All Lists]
Advanced

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

Re: Problems when trying to install a package via guile API


From: Alex Kost
Subject: Re: Problems when trying to install a package via guile API
Date: Thu, 14 Aug 2014 08:46:16 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Hello,

David Thompson (2014-08-14 06:44 +0400) wrote:

> 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?

Your code works for me, do you use the latest "guix pull"?

I vaguely recall that I had some <syntax-transformer> that was cured by
"guix pull".



reply via email to

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