When comparing GNU Guix vs pkgsrc, the Slant community recommends pkgsrc for most people. In the question“What are the best Linux package managers?” pkgsrc is ranked 7th while GNU Guix is ranked 12th. The most important reason people chose pkgsrc is:
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Specs
Ranked in these QuestionsQuestion Ranking
Pros
Pro Can setup a shell which has exactly the defined libraries available
A method which works across languages and provides a reproducible programming environment.
Pro Can always roll back to a safe state
Guix creates new profile generations for each operation. If anything goes wrong, a simple --roll-back gets you immediately back to the previous, working, generation. Because it is a purely functional package management system, generations don't affect each other, so you're back to the exact same state as before : still working.
Pro Can create independent packages
Guix pack creates packages which do not need Guix to be run.
Pro No side effects when building packages
Guix is a purely functional package management system. This means that the act of building a package does not have side effects, such as destructively updating or deleting files that may be used by other packages.
Pro Can build containers right-away, from docker to tarballs
See guix pack --help and here.
Pro Easy to add your own packages
The clean and declarative syntax makes it easy to define new packages by using an existing one as an example.
Pro Doesn't require root privileges
Normal users can install packages on a Guix-enabled system, or even run their own Guix instance if the system isn't Guix-enabled.
Pro pkgin is an apt-like tools for installing binaries from pkgsrc
pkgin aims to be a tool similar to apt/yum for managing pkgsrc binaries by relying on pkg_summary for installing, removing and upgrading packages and dependencies, using a remote repo.
Pro Adapted for use on over a dozen different operating systems
Has been adopted to be used on several Unix-like operating systems and Windows. It's also the default package manager of DragonflyBSD and of the (now discounted) Bluewall Linux distro.
Pro Installs and works in the same way as MacPorts
Installs its own dependencies which means that it is very secure. Cannot install anything unless you use the "sudo" command which is in keeping with the Unix philosophy.
Pro Both binary packages and source build possible
Fast software installation is possible by using binary packages. It's also easy to build from source which allows for different compile-time options (like different UI backends) as well as gaining access to pre-release versions of software in certain cases.
Pro Offering tooling for backporting fixes
Backporting fixes can be done by cherry-picking updates from a newer branch (pkgsrc is released every 3 months) and creating a package. Sometimes bugs need to be fixed for production and there is neither a fix in newer pkgsrc nor the softwares upstream. So pkgsrc has tools like pkgdiff, mkpatches, etc. that help with developing patches and building binary packages from that. A bit of documentation about that process can be found here.
Pro Does not need Xcode command line tools or Xcode.
This means that you can install it fresh on a new installation of MacOS and have all your favorite apps installed right from the start.
Pro Works easily with Ansible
Can be used from within Ansible to install packages on macOS.
Pro Easy installation if you use 3rd party scripts
This one works brilliantly.
Cons
Con Updates take a long time
It's gotten better over time but both updating Guix itself and updating the installed packages can take a long time.
Con Cannot handle filetypes that have different semantics across different versions
While the functional approach that Guix takes is great for sandboxing binary artifacts of packages, it seriously lacks any power in handling configuration files or user data. It's difficult to upgrade and downgrade files where semantics and syntax can change between versions.
Con Relatively complicated setup and installation
Installing and setting pkgsrc up is a bit more complicated than in other package managers where it often consists in running a single script.
Con Not so broadly used on MacOS as compared with MacPorts
You do not hear about Pkgsrc as openly as you hear the words "HomeBrew" or "MacPorts".
Con Outdated packages
Some packages are outdated.
Con Can't install some packages
Even building well known packages (except MacPorts) from source using the ports can fail.