Added a with-nix-profile macro. It can be used in package declaration of Guix System and Guix Home, transforming nix-shell-wrapper into packages and collecting Nix packages from them.
With the collected Nix packages, an additional build-nix-profile command is provided to build and link the resulted profile to the specified path, also registering GC root.
What's left is to write services to execute this build-nix-profile command and extend search paths ;)
To avoid loading incompatible libraries from the other distribution and crashing programs, like what may happen when using Guix and Nix on foreign distros, the constructed Nix profile won't contain executables and commands are provided by the nix shell wrappers.
See also the first few lists in codeberg.org/hako/Rosenthal/sr… and let me know what are missing.
#guix #nix