#1 Implicit dependency on GNU sed
Closed by superkamiguru. Opened by kkremitzki.

In msg/machine.scm, line 202:

(system "sed -i \"s/\\$UID/$(id -u)/g\" ~/.guix/home/config.scm")

This use of -i is not compliant with the BSD sed available by default in macOS, it's a GNUism. BSD sed requires a suffix when -i is used, but one can simply provide an empty string, i.e. -i ''.

Thus, the setup instructions failed for me, although the error message appears to depend on the fact that my username starts with 'k':

sed: 1: "/Users/kurt/.guix/home/ ...": invalid command code k

Later on, there are failure messages related to the literal $UID still being present in ~/.guix/home/config.scm, since the sed step failed.

I was able to get the instructions to work by doing brew install gnu-sed and adding this to my ~/.zprofile:

export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"

but a better fix would probably be to replace that sed invocation with one that is both BSD and GNU sed compliant.


Metadata Update from @superkamiguru:
- Issue assigned to superkamiguru

This should now be fixed with commit https://pagure.io/MSG/msg-cli/c/49a9c81ecda78e677e61399e4332070bf48d14ec?branch=main

Metadata Update from @superkamiguru:
- Issue status updated to: Closed (was: Open)

Metadata