Functional package management
Symlinking package schemes such as GNU Stow have been around for a while. The Nix package manager formalizes and extends these ideas.
This 2013 Ludovic Cortes paper on GNU Guix provides a good overview on it's goals and methods, starting with a general description of the Nix package manager:
No side-effects (akin to "pure functions"). Each derivation (the description of a specific build) is excuted in a chroot.
Referential transparency as a result of:
Defined inputs mapped to outputs in an immutable /nix/store directory (known as the store by a hash function (akin to on-disk memoization(*)
Transactional.. even with an interruption we know exactly what state we are in.
Each user has symlinks to the immutable /nix/store which allows individuals to mix-n-match unique configurations but to share the disk-space to the specific immutable entity.
The builders in NixOS often use BASH
The store is garbage collected
RPC is used to synchronize operations on the store by builders.
The Nix interpreter is C++ originally and uses its own Domain Specific Language for the derivations. GNU Guix replaces this DSL with its own Scheme-based one, but keeps the Nix primitives for the builders.
The Guix derivations explicitly expose more low-level inputs.
Guix replaces the use of NixOS BASH + find + sed with its own modules. These include separate builders for e.g. PERL.
NixOS relies on /bin/sh being in the chroot, GNU Guix does not. Instead it manually substitues them with correct shebangs from the store, e.g. /unix/store/what/ever/98uaf8u8w-bin.sh . This has the advantage of being both more pure, and also allowing other shells such as dash to be executed.
On-disk memoization is the cacheing of the output of pure functions. Among other goals it allows large computational tasks to be run in parallel and/or interrupted and re-started. There are attempts in e.g. Python to enable this for scientific computing some of which require that you check the function is actually pure and others such as Philip Guo 's IncPy which try to be more general. A more in-depth discussion can be found in, for example, Rice's CS-314 course.











