all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Local definitions and Virtual machine image
@ 2020-06-03 12:17 Emmanuel Medernach
  2020-06-03 15:23 ` Marius Bakke
  0 siblings, 1 reply; 5+ messages in thread
From: Emmanuel Medernach @ 2020-06-03 12:17 UTC (permalink / raw)
  To: help-guix

Hello Guixers !

I  created an  image with  'guix system  vm-image'
which  contains  local  defined  packages.   These
packages  are  present   on  the  Virtual  Machine
however  they are  not listed  with 'guix  package
--list-installed'.    As  I   need  to   customize
LD_LIBRARY_PATH, I use "guix  build" to list store
directories  from  package   names  but  it  tries
instead to  recompile them  even though  they  are
already installed.

How to  properly export  local definitions  in the
virtual machine image ?

Best regards,

Emmanuel Medernach

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Local definitions and Virtual machine image
  2020-06-03 12:17 Local definitions and Virtual machine image Emmanuel Medernach
@ 2020-06-03 15:23 ` Marius Bakke
  2020-06-05 14:54   ` Emmanuel Medernach
  0 siblings, 1 reply; 5+ messages in thread
From: Marius Bakke @ 2020-06-03 15:23 UTC (permalink / raw)
  To: Emmanuel Medernach, help-guix

[-- Attachment #1: Type: text/plain, Size: 1608 bytes --]

Emmanuel Medernach <emmanuel.medernach@gmail.com> writes:

> Hello Guixers !
>
> I  created an  image with  'guix system  vm-image'
> which  contains  local  defined  packages.   These
> packages  are  present   on  the  Virtual  Machine
> however  they are  not listed  with 'guix  package
> --list-installed'.

'guix package -I' only lists packages that are installed to the user
profile.  Use 'guix package -p /run/current-system/profile -I' to see
system-installed packages.

> As  I   need  to   customize
> LD_LIBRARY_PATH, I use "guix  build" to list store
> directories  from  package   names  but  it  tries
> instead to  recompile them  even though  they  are
> already installed.

The reason 'guix build foo' gives a different result is because you have
not run 'guix pull', so you are using the "guix snapshot" from
gnu/packages/package-management.scm, which is on a fixed commit.

Whereas when you built the VM, you were likely using a newer version of
Guix.

> How to  properly export  local definitions  in the
> virtual machine image ?

There are a couple of ways around this.  One is to run 'make
update-guix-package' in the Guix source tree to update the Guix
snapshot, and use './pre-inst-env' when generating the VM.  It requires
a Guix development setup though.

Another is to look at the commit that was used to generate the VM in
/run/current-system/provenance and run 'guix pull --commit=that-commit'.

Perhaps 'guix system vm-image' could learn a '--update-guix-snapshot' to
automatically update the "system guix".  Someone would have to implement
it first though.  :-)

HTH,
Marius

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Local definitions and Virtual machine image
  2020-06-03 15:23 ` Marius Bakke
@ 2020-06-05 14:54   ` Emmanuel Medernach
  2020-06-05 15:12     ` Emmanuel Medernach
  0 siblings, 1 reply; 5+ messages in thread
From: Emmanuel Medernach @ 2020-06-05 14:54 UTC (permalink / raw)
  To: help-guix

On Wed, Jun 3, 2020 at 5:23 PM Marius Bakke <marius@gnu.org> wrote:

>
> 'guix package -I' only lists packages that are installed to the user
> profile.  Use 'guix package -p /run/current-system/profile -I' to see
> system-installed packages.
>
>
Thanks it works


> The reason 'guix build foo' gives a different result is because you have
> not run 'guix pull', so you are using the "guix snapshot" from
> gnu/packages/package-management.scm, which is on a fixed commit.
>
> Whereas when you built the VM, you were likely using a newer version of
> Guix.
>
>
I pulled  the same commit  on the  VM that the  one obtained
with  "guix  describe"  but  it still  recompiles  my  local
packages with "guix build". Did I forget something ?


> There are a couple of ways around this.  One is to run 'make
> update-guix-package' in the Guix source tree to update the Guix
> snapshot, and use './pre-inst-env' when generating the VM.  It requires
> a Guix development setup though.
>
> Another is to look at the commit that was used to generate the VM in
> /run/current-system/provenance and run 'guix pull --commit=that-commit'.
>
> Perhaps 'guix system vm-image' could learn a '--update-guix-snapshot' to
> automatically update the "system guix".  Someone would have to implement
> it first though.  :-)
>
>
Ok, Thanks for your help

Best regards,

Emmanuel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Local definitions and Virtual machine image
  2020-06-05 14:54   ` Emmanuel Medernach
@ 2020-06-05 15:12     ` Emmanuel Medernach
  2020-07-25 15:12       ` Marius Bakke
  0 siblings, 1 reply; 5+ messages in thread
From: Emmanuel Medernach @ 2020-06-05 15:12 UTC (permalink / raw)
  To: help-guix

> I pulled  the same commit  on the  VM that the  one obtained
> with  "guix  describe"  but  it still  recompiles  my  local
> packages with "guix build". Did I forget something ?
>


I mean it does not download from my substitute server.

I have another question: How to query the output paths given an installed
package name ? guix build does it but I would like to avoid recompiling.

Best regards,

Emmanuel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Local definitions and Virtual machine image
  2020-06-05 15:12     ` Emmanuel Medernach
@ 2020-07-25 15:12       ` Marius Bakke
  0 siblings, 0 replies; 5+ messages in thread
From: Marius Bakke @ 2020-07-25 15:12 UTC (permalink / raw)
  To: Emmanuel Medernach, help-guix

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Emmanuel Medernach <emmanuel.medernach@gmail.com> writes:

>> I pulled  the same commit  on the  VM that the  one obtained
>> with  "guix  describe"  but  it still  recompiles  my  local
>> packages with "guix build". Did I forget something ?
>>
>
>
> I mean it does not download from my substitute server.

Did you authorize the substitute server signing key?

Perhaps the substitute server lacks some of the package outputs?

> I have another question: How to query the output paths given an installed
> package name ? guix build does it but I would like to avoid recompiling.

I don't know an easy way short of 'guix build -d the-package' and
inspect the derivation :-/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-25 15:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-03 12:17 Local definitions and Virtual machine image Emmanuel Medernach
2020-06-03 15:23 ` Marius Bakke
2020-06-05 14:54   ` Emmanuel Medernach
2020-06-05 15:12     ` Emmanuel Medernach
2020-07-25 15:12       ` Marius Bakke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.