help-guix
[Top][All Lists]
Advanced

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

Re: '--load-path' option not working for 'guix system' command


From: Oleg Pykhalov
Subject: Re: '--load-path' option not working for 'guix system' command
Date: Sun, 18 Nov 2018 14:08:38 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Taegil Bae <address@hidden> writes:

> On 11/14/18 6:20 PM, Oleg Pykhalov wrote:
>> Could you place a (pk '%load-path %load-path) sexp before the
>> (operating-system ...) to see what does Guile load?
>
> Here is the output:
>
> # guix system reconfigure /etc/config.scm -L $HOME/my-guix -n
>
> ;;; (%load-path ("/root/my-guix"
>
> "/gnu/store/p9wm67w3rfw3hlb9iljgvsfn84mz4w9d-guile-2.2.4/share/guile"))
>
> The following derivations would be built:
>    /gnu/store/14cww1f93h0zh6rylr18wsb8l16j7ipn-system.drv
> /gnu/store/qk1ninhablh8ax7633gppwj447czc04r-grub.cfg.drv
> /gnu/store/jk0c7vly17k8azbpzbcpd1lrhpmk7hig-bootloader-installer.drv
> /gnu/store/bp735l7fzyv86rwps1ajdap2k9gvyvr1-module-import-compiled.drv
> /gnu/store/s04i207w7k22sgl9qfss551cp3d5cgvf-gtk-icon-themes.drv
>            .....
>
> # export GUIX_PACKAGE_PATH=~/my-guix
> # guix system reconfigure /etc/config.scm -n
> ;;; note: source file /root/my-guix/gnu/packages/spice.scm
> ;;;       newer than compiled
> /gnu/store/6gjbbs9d68626j05h1ff3yya3nlizsc0-guix-e740a9022-modules/gnu/packages/spice.go
> ;;; note: source file /root/my-guix/gnu/packages/spice.scm
> ;;;       newer than compiled
> /run/current-system/profile/lib/guile/2.2/site-ccache/gnu/packages/spice.go
>
> ;;; (%load-path ("/root/my-guix"
> "/gnu/store/xykmv219fysc8rkb0bwqkkw64a37sm58-guix-e740a9022-modules"
>
> "/gnu/store/p9wm67w3rfw3hlb9iljgvsfn84mz4w9d-guile-2.2.4/share/guile"))
> The following derivations would be built:
>    /gnu/store/14cww1f93h0zh6rylr18wsb8l16j7ipn-system.drv
>    /gnu/store/qk1ninhablh8ax7633gppwj447czc04r-grub.cfg.drv
> /gnu/store/jk0c7vly17k8azbpzbcpd1lrhpmk7hig-bootloader-installer.drv

As you could see the %load-path is the same.  So, does Guix build a
system with your modified package?

Also, could you post your modified package?  I'm interested in how did
you name a “package object” (e.g. a ‘my-foo’) and “package name”
(e.g. ‘my-hello’):

(use-modules (gnu packages base))

(define-public my-foo
  (package (inherit hello)
    (name "my-hello")
  ;; …
  ))

> However, I think that load-path of 'guix system' have nothing to do
> with config.scm. If I run 'guix system --help' with GUIX_PACKAGE_PATH
> defined, I have the output below:
>
> # guix system --help
> ;;; note: source file /root/my-guix/gnu/packages/spice.scm
> ;;;       newer than compiled
> /gnu/store/6gjbbs9d68626j05h1ff3yya3nlizsc0-guix-e740a9022-modules/gnu/packages/spice.go
> ;;; note: source file /root/my-guix/gnu/packages/spice.scm
> ;;;       newer than compiled
> /run/current-system/profile/lib/guile/2.2/site-ccache/gnu/packages/spice.go

[…]

Sorry, I don't understand what the example above should tell? From my
experience a Guile module inside %load-path is enough.

It would be helpful if you post your "/root/my-guix" directory content
(directory structure and *.scm files.  To use ‘-L’ or ‘--load-path=DIR’
with ‘guix’ commands the "/root/my-guix" should be prepared accordingly
as in [1].  Also [2] might be helpful.

[1] https://www.gnu.org/software/guix/manual/html_node/Package-Modules.html
[2] 
https://www.gnu.org/software/guile/manual/html_node/Using-the-Guile-Module-System.html#Using-the-Guile-Module-System

Oleg.

Attachment: signature.asc
Description: PGP signature


reply via email to

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