guix-devel
[Top][All Lists]
Advanced

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

Problems when trying to install a package via guile API


From: David Thompson
Subject: Problems when trying to install a package via guile API
Date: Wed, 13 Aug 2014 22:44:49 -0400
User-agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

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 via email to

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