From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Problems when trying to install a package via guile API Date: Wed, 13 Aug 2014 22:44:49 -0400 Message-ID: <87zjf7iyce.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHl2C-0007uq-Ph for guix-devel@gnu.org; Wed, 13 Aug 2014 22:45:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHl25-0006ZP-SG for guix-devel@gnu.org; Wed, 13 Aug 2014 22:45:00 -0400 Received: from na3sys009aog133.obsmtp.com ([74.125.149.82]:54254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHl25-0006ZG-LU for guix-devel@gnu.org; Wed, 13 Aug 2014 22:44:53 -0400 Received: by mail-qa0-f54.google.com with SMTP id k15so516800qaq.13 for ; Wed, 13 Aug 2014 19:44:51 -0700 (PDT) Received: from izanagi (209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com. [209.6.40.86]) by mx.google.com with ESMTPSA id q68sm4077170qgq.36.2014.08.13.19.44.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Aug 2014 19:44:50 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org 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 #: ERROR: Wrong type to apply: # 0 (# #) 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? --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate