Guix Installed on macOS: Emacs Packages Duplicated - Listed Twice
Guix is a functional package manager for the GNU system. It's a powerful tool for managing software packages, especially in a GNU/Linux environment. However, when using Guix on macOS, you might encounter an issue where some Emacs packages appear to be duplicated in the list of installed packages. In this article, we will explore this issue in detail and provide possible solutions.
Guix Installation on macOS
To install Guix on macOS, you need to use the Guix Data Service, which is a remote-only Guix repository. The installation process is straightforward and involves adding the Guix Data Service to your system and then installing Guix itself. Once Guix is installed, you can use it to manage your software packages.
For example, if you want to install Emacs and some of its packages, you can use the following command:
sudo guix install emacs emacs-discover emacs-mastodon
This command installs Emacs, as well as the packages emacs-discover and emacs-mastodon. However, you might notice that after the installation is complete, these packages appear twice in the list of installed packages.
Duplicated Packages
The reason for the duplicated packages is due to the way Guix handles dependencies. When you install a package, Guix also installs all of its dependencies. In this case, the packages emacs-discover and emacs-mastodon have dependencies that are already installed on your system. Guix recognizes these dependencies but lists them as part of the installed package to ensure that they are available for use.
Avoiding Duplicates
To avoid having duplicated packages in your list of installed packages, you can use the --install-without-dependencies option when installing a package. This option installs only the package itself and not its dependencies. You can then manually install the dependencies using Guix or another package manager.
For example, to install Emacs without its dependencies, use the following command:
sudo guix install --install-without-dependencies emacs
After installing Emacs, you can then install its dependencies manually using Guix:
sudo guix install emacs-discover emacs-mastodon
Summary
In summary, when using Guix on macOS, you might encounter an issue where some Emacs packages appear to be duplicated in the list of installed packages. This is due to the way Guix handles dependencies. To avoid having duplicated packages, you can use the --install-without-dependencies option when installing a package and then manually install its dependencies.