Re: Using emacs library with guix environment

2021-10-06 Thread Kyle Meyer
jgart writes:

> I'm only able to properly source the library into the environment if I run 
> the following:
>
> `guix environment emacs-commander --ad-hoc emacs-commander`
>
> Why do I have to provide emacs-commander twice to the environment command?

I believe the key package that the first emacs-commander (the one before
--ad-hoc) brings in is emacs along with its corresponding EMACSLOADPATH.

Notice that

  $ guix environment --pure --ad-hoc bash emacs-commander -- sh -c 'echo 
$EMACSLOADPATH'

outputs nothing.  Now if emacs is added as an ad-hoc package:

  $ guix environment --pure --ad-hoc bash emacs-commander emacs -- sh -c 'echo 
$EMACSLOADPATH'
  /gnu/store/qg6rsw6w587aykln2dzssr43nl6jq1a1-profile/share/emacs/site-lisp

Or another test, dropping --pure to be closer to your initial snippet:

  $ guix environment --ad-hoc emacs-commander -- \
emacs -Q --batch --eval '(print (locate-library "commander"))'
  nil

  # add emacs as ad-hoc package
  $ guix environment --ad-hoc emacs-commander emacs -- \
emacs -Q --batch --eval '(print (locate-library "commander"))'
  
"/gnu/store/kr9cnw5c9nydiilb25w3q5bnp5c1zvca-emacs-commander-0.7.0/share/emacs/site-lisp/commander-0.7.0/commander.elc"



Re: Using emacs library with guix environment

2021-10-06 Thread edk
Hello !

I'm not sure what the problem is with this particular package, but:
guix environment emacs-commander

will create an env with all you need to BUILD emacs-commander

while

guix environment --ad-hoc emacs-commander

will create an env in which emacs-commander is installed.

Now, if guix environment --ad-hoc emacs-commander doesnt work, it may
mean that one of the native-input of emacs-commander should be an input
or a propagated-input instead. That would explain why

guix environment emacs-commander --ad-hoc emacs-commander

works: because it installs this native-input in the env as well.

I hope this makes sense, if not please ask away.

Cheers,

Edouard.

jgart  writes:

> Hi,
>
> I'm trying to use emacs-commander with guix environment on a foreign distro.
>
> I'm only able to properly source the library into the environment if I run 
> the following:
>
> `guix environment emacs-commander --ad-hoc emacs-commander`
>
> Why do I have to provide emacs-commander twice to the environment command?
>
> I tested only using --ad-hoc or without and none of those work.
>
> I'm only able to properly source emacs-commander when I include it twice as in
> the above command.
>
> Could someone explain the reason for this to me?
>
> Any help is much appreciated.
>
> all best,
>
> jgart
>
> https://github.com/rejeep/commander.el
>
> 3B1D 7F19 E36B B60C 0F5B 2CA9 A52A A2B4 77B6 DD35




Using emacs library with guix environment

2021-10-06 Thread jgart
Hi,

I'm trying to use emacs-commander with guix environment on a foreign distro.

I'm only able to properly source the library into the environment if I run 
the following:

`guix environment emacs-commander --ad-hoc emacs-commander`

Why do I have to provide emacs-commander twice to the environment command?

I tested only using --ad-hoc or without and none of those work.

I'm only able to properly source emacs-commander when I include it twice as in
the above command.

Could someone explain the reason for this to me?

Any help is much appreciated.

all best,

jgart

https://github.com/rejeep/commander.el

3B1D 7F19 E36B B60C 0F5B 2CA9 A52A A2B4 77B6 DD35



Re: repair broken boot record

2021-10-06 Thread pelzflorian (Florian Pelz)
On Wed, Oct 06, 2021 at 10:23:38AM +0200, Thomas Danckaert wrote:
> On 2021-10-05 13:04, pelzflorian (Florian Pelz) wrote:
> > On Tue, Oct 05, 2021 at 11:28:50AM +0200, Thomas Danckaert wrote:
> > > In one of the final
> > > steps, where guix tries to install the bootloader, I get the error:
> > > 
> > > /gnu/store/.../grub/i386-pc/modinfo.sh doesn't exist. Please specify
> > > --target or --directory.
> > 
> > This is strange.  When you reconfigure, Guix should print the
> > grub-install command that was used, which should include both --target
> > and --directory.
> 
> The full message is:
> 
> guix system: error: '/gnu/store/v77n5mgrub-efi-2.06/sbin/grub-install
> --boot-directory //boot --bootloader-id=Guix --efi-directory=/boot/efi'
> exited with status 1; output follows:
> 
>   /gnu/store/.../grub-install: error:
> /gnu/store/.../lib/grub/i386-pc/modinfo.sh doesn't exist.  Please specify
> --target or --directory'
> 
> Note that the grub-install command doens't contain '--target' or
> '--directory'.  (Also: my system is x64, and this seems to be for i386.
> Should there be a --target=x64_86-efi somewhere?)

Sorry, I was wrong about --target being used; looking in the Guix
source at gnu/bootloader/grub.scm
,
--target is only for traditional BIOS boot and not EFI boot.

Your command is correct. I checked and have used exactly the same
command successfully (I checked the install-bootloader.scm file after
reconfigure on an EFI PC), and it should install, but for you it does
not.  It is good to see the full message though.

Note that you can run exactly the same command manually, but the
result would likely be the same.


> > However, perhaps the chroot is at fault: Before chrooting to, let’s
> > say, /mnt with chroot /mnt, you need to have mounted the /dev/sdXy
> > file system with EFI on it (that which is declared in your config.scm)
> > to /mnt/boot/efi.
> 
> I have in my config 'target /boot/efi'.  My EFI partition is /dev/sda1.  If
> I mount it like
> # mount /dev/sda1 /mnt2
> (/mnt2 because I already have my /dev/sda3 partition with guix at /mnt)
> I find the following layout:
> 
> /mnt2/EFI/
>   EFI
>   grub
>   Guix
> 
> what would be the correct bind mount?  I tried
> # mount --bind /mnt2/EFI /boot/efi
> so I now have
> /boot/efi/
>   EFI
>   grub
>   Guix
> 
> Any idea if that is the desired layout?

>From outside the chroot, you should

# mount /dev/sda3 /mnt
# mount /dev/sda1 /mnt/boot/efi

Regards,
Florian



Re: repair broken boot record

2021-10-06 Thread Thomas Danckaert

On 2021-10-05 13:04, pelzflorian (Florian Pelz) wrote:

On Tue, Oct 05, 2021 at 11:28:50AM +0200, Thomas Danckaert wrote:

In one of the final
steps, where guix tries to install the bootloader, I get the error:

/gnu/store/.../grub/i386-pc/modinfo.sh doesn't exist. Please specify
--target or --directory.


This is strange.  When you reconfigure, Guix should print the
grub-install command that was used, which should include both --target
and --directory.


The full message is:

guix system: error: 
'/gnu/store/v77n5mgrub-efi-2.06/sbin/grub-install --boot-directory 
//boot --bootloader-id=Guix --efi-directory=/boot/efi' exited with 
status 1; output follows:


  /gnu/store/.../grub-install: error: 
/gnu/store/.../lib/grub/i386-pc/modinfo.sh doesn't exist.  Please 
specify --target or --directory'


Note that the grub-install command doens't contain '--target' or 
'--directory'.  (Also: my system is x64, and this seems to be for i386.  
Should there be a --target=x64_86-efi somewhere?)



However, perhaps the chroot is at fault: Before chrooting to, let’s
say, /mnt with chroot /mnt, you need to have mounted the /dev/sdXy
file system with EFI on it (that which is declared in your config.scm)
to /mnt/boot/efi.


I have in my config 'target /boot/efi'.  My EFI partition is /dev/sda1.  
If I mount it like

# mount /dev/sda1 /mnt2
(/mnt2 because I already have my /dev/sda3 partition with guix at /mnt)
I find the following layout:

/mnt2/EFI/
  EFI
  grub
  Guix

what would be the correct bind mount?  I tried
# mount --bind /mnt2/EFI /boot/efi
so I now have
/boot/efi/
  EFI
  grub
  Guix

Any idea if that is the desired layout?

thanks!

Thomas