Alex Kost <alez...@gmail.com> skribis: > For a usual profile, packages are placed in a profile directory itself, > but for a system profile, packages are placed in 'profile' > sub-directory. So we need to do some special cases for system profiles > to find packages there as well. > > * emacs/guix-base.el (guix-packages-profile): New procedure. > (guix-manifest-file): Use it. Add optional 'system?' argument. > * emacs/guix-ui-generation.el (guix-system-generation?) > (guix-generation-current-packages-profile): New procedures. > (guix-generation-packages, guix-generation-insert-packages) > (guix-generation-packages-buffer): Add optional 'system?' argument. > (guix-profile-generation-manifest-file) > (guix-profile-generation-packages-buffer): Adjust accordingly. > * emacs/guix-main.scm (generation-package-specifications+paths): Rename to... > (profile->specifications+paths): ... this. Use a single 'profile' argument.
[...] > +(defun guix-packages-profile (profile &optional generation system?) > + "Return a directory where packages are installed for the > +PROFILE's GENERATION. > + > +If SYSTEM? is non-nil, then PROFILE is considered to be a system > +profile. Unlike usual profiles, for a system profile, packages > +are placed in 'profile' subdirectory." > + (let ((profile (if generation > + (guix-generation-file profile generation) > + profile))) > + (if system? > + (expand-file-name "profile" profile) > + profile))) It seems you’re calling /run/current-system the system profile, which leads to the ‘system?’ Boolean here, but the system profile really is /run/current-system/profile. I had overlooked it, but wouldn’t it be easier if patch #2 did:
+(defvar guix-system-profile + (concat guix-config-state-directory "/profiles/system/profile") + "System profile.")
? Ludo’.