Deploying NPM packages with the Nix package manager
- Track: Distributions devroom
- Room: K.4.601
- Day: Saturday
- Start: 16:30
- End: 17:20
Nix is a package manager providing a number of unique features to automate deployments in a reliable and reproducible way. It serves as the basis of the NixOS Linux distribution (that can be automatically installed from a single declarative specification), as well as a number of additional deployment solutions, such as NixOps, that deploys virtual machines in the cloud and Hydra: the Nix-based continuous integration server. Although Nix offers all kinds of deployment benefits, integration with language-specific package managers that also do dependency management, such as the NPM package manager, is problematic as they conflict with Nix's reliability properties. In this presentation, I will show node2nix
, a tool that automatically generates Nix expressions (build recipes) from
an NPM package's package.json
configuration file, allowing users to deploy NPM packages with the Nix package manger alongside other types of packages (e.g. Autotools, Perl, Python, ...) that constitute a large complex system.
In this talk I try to address the following target audience:
- System administrators/DevOps:
- people who typically deploy entire software systems in which parts of them might be Node.js applications
- NPM makes it less convenient to use a single intergrated deployment solution, e.g. you might need to use both NPM and the host system's package manager + additional scripts
- solution requires on external distribution channels
- Distro packagers:
- Some types of software are hard to package and as a result difficult to include with e.g. a Linux distribution
- Especially if source package uses a system that does both build and dependency management
- The Dependency manager conflicts with the host system's package manager and might use inferior technology
- Besides NPM, Apache Maven is also a prominent example
- Node.js developers:
- Many Node developers are not aware of some of NPM's dependency management implications
- Good to raise awareness
- Package manager developers (e.g. the NPM devs):
- Virtually every modern programming language/environment has its own (language-specific) package manager
- Lessons learned are important for everybody
Speakers
Sander van der Burg |