So you want to write a package manager
This article describes the status quo of package managers.  Lock files, dependency resolution algorithms, etc.  However, these are obsolete.  The functional package management paradigm approaches the problem from a different angle which is able to <i>precisely</i> describe the full dependency graph for a piece of software, all the down to the bootstrap binaries (the C compiler&#x27;s compiler, etc.).  In this system there is no dependency resolution, because each package is explicit in what it depends on.  A dependency is much more than a version number.  The novel idea in functional package management is that a package can be viewed as a pure function whose arguments are the dependencies, the source code, the build script, etc. and whose output is the built binary.  By viewing packaging from this perspective, functional package managers overcome the problems that plague traditional package managers, allowing for unprivileged package management, transactional upgrades and roll backs, multiple variants of a package coexisting without conflict, etc.  One such implementation of functional package management, the one I hack on and recommend checking out, is GNU Guix.<p><a href="https:&#x2F;&#x2F;gnu.org&#x2F;software&#x2F;guix&#x2F;manual&#x2F;html_node&#x2F;Introduction.html#Introduction" rel="nofollow">https:&#x2F;&#x2F;gnu.org&#x2F;software&#x2F;guix&#x2F;manual&#x2F;html_node&#x2F;Introduction....</a>