Subject: bug#32456: Guile failed to call package-derivation without pre-inst-env

From: Oleg Pykhalov <[email-masked]>
Date: Thu, 16 Aug 2018 19:09:03 +0300

Hello Guix,

I have an issue with ‘package-derivation’ procedure.  When I use Guile
from my user's profile I get an error but not when I use ‘pre-inst-env’.

The %load-path is differ only in /home/natsu/src/guix when pre-inst-env.

guix (GNU Guix) 689aacc12f1d9c0b511e2010185b2e7a80de5201

--8<---------------cut here---------------start------------->8---
natsu@magnolia ~$ guile
GNU Guile 2.2.4
…
scheme@(guile-user)> (use-modules (guix) (guix ui) (guix store))
scheme@(guile-user)> (define c (open-connection))
scheme@(guile-user)> (package-derivation c (@@ (gnu packages base) hello))
guix/store.scm:928:31: In procedure add-to-store: Throw to key `srfi-34' with args `(#<condition &nix-protocol-error [message: "regular file expected" status: 1] 28703c0>)'.
Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,q

natsu@magnolia ~$ ~/src/guix/pre-inst-env guile
GNU Guile 2.2.4
…
scheme@(guile-user)> (use-modules (guix) (guix ui) (guix store))
scheme@(guile-user)> (define c (open-connection))
scheme@(guile-user)> (package-derivation c (@@ (gnu packages base) hello))
$1 = #<derivation /gnu/store/grd5g9m671nhrzl285c64npwlsy3prz2-hello-2.10.drv => /gnu/store/bihfrh609gkxb9dp7n96wlpigiv3krfy-hello-2.10 3c6d8c0>
--8<---------------cut here---------------end--------------->8---

Oleg.