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