bug#72333: [PATCH] gnu: emacs-transient: Prioritise loading over built-in.

2024-08-17 Thread Tomas Volf
On 2024-07-31 19:10:03 +0200, Liliana Marie Prikler wrote:
> The other (recommended at the moment) would be to use the proper
> transformation to natively compile your emacs packages.

So just to make sure I understand correctly what is the correct work around
here.  Let us assume I install emacs and emacs-magit into my home environment.
So until now I have (leaving everything else out) this:

(home-environment
 (packages (list emacs emacs-magit )))

Assuming I want to follow the recommendation above, I should turn it into
something like this:

(home-environment
 (packages (map (package-input-rewriting `((,emacs-minimal . ,emacs)))
(list emacs emacs-magit 

Did I get it right?  Are there any downsides to doing this (except compute)?

Have a nice day,
Tomas

Side note: I am surprised how long emacs-yaml takes to build on my ~5.5 GHz
build machine.  I compile whole of firefox faster.

--
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.


signature.asc
Description: PGP signature


bug#72333: [PATCH] gnu: emacs-transient: Prioritise loading over built-in.

2024-08-17 Thread Liliana Marie Prikler
Am Samstag, dem 17.08.2024 um 11:26 +0200 schrieb Tomas Volf:
> On 2024-07-31 19:10:03 +0200, Liliana Marie Prikler wrote:
> > The other (recommended at the moment) would be to use the proper
> > transformation to natively compile your emacs packages.
> 
> So just to make sure I understand correctly what is the correct work
> around here.  Let us assume I install emacs and emacs-magit into my
> home environment. So until now I have (leaving everything else out)
> this:
> 
>     (home-environment
>  (packages (list emacs emacs-magit )))
> 
> Assuming I want to follow the recommendation above, I should turn it
> into something like this:
> 
>     (home-environment
>  (packages (map (package-input-rewriting `((,emacs-minimal .
> ,emacs)))
>     (list emacs emacs-magit 
> 
> Did I get it right?  Are there any downsides to doing this (except
> compute)?
Yep, that's the low-level way of achieving this (more or less – emacs-
minimal isn't always the only package to replace).  On a higher level,
you can bind (package-input-rewriting …) to a name and use that.  I
personally prefer the (options->transformation …)¹ variant, though,
which is nearly identical and compiles to this.

Cheers

> Side note: I am surprised how long emacs-yaml takes to build on my
> ~5.5 GHz build machine.  I compile whole of firefox faster.
That sounds concerning.  We might want to look into individual bugs
such as this.

¹ the argument is '((with-input . "emacs-minimal=")),
  which imho, reads nicer.   could be emacs, emacs-pgtk,
  etc.





bug#72686: Impossible to remove all offload machines

2024-08-17 Thread Ian Eure

Ran into this issue last week.  If you:

- Configure some offload build machines in your operating-system
 configuration.
- Reconfigure your system.
- Remove all offload build machines.
- Reconfigure your system again.

...then various guix operations will still try to connect to 
offload machines, even if you reboot the affected client.


This is caused by a bug in the `guix-activation' procedure:

  ;; ... and /etc/guix/machines.scm.
  #$(if (null? (guix-configuration-build-machines config))
#~#f
(guix-machines-files-installation
 #~(list #$@(guix-configuration-build-machines
  config

If there are no build machines defined in the configuration, no
operation is performed (#f is returned), which leaves the previous
generation’s /etc/guix/machines.scm in place.

The same issue appears to affect channels:

  ;; ... and /etc/guix/channels.scm...
  #$(and channels (install-channels-file channels))

I’d be happy to take a stab at fixing this, but I’m not certain 
what

direction to go, or how much to refactor to get there. Should the
channels/machines files be removed (ignoring errors if they don’t
exist)?  Should empty files be installed?  Should that happen 
inline
in `guix-activation', or in another procedure? Should the 
filenames be
extracted to %variables to avoid duplicating between the two 
places

they’ll be used?

If someone would like to provide answered, I would contribute a 
patch.


Thanks,

— Ian