We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Deploying NPM packages with the Nix package manager

Formal Metadata

Title
Deploying NPM packages with the Nix package manager
Title of Series
Number of Parts
611
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language
Production Year2017

Content Metadata

Subject Area
Genre
Abstract
Nix is a package manager providing a number of unique features to automatedeployments in a reliable and reproducible way. It serves as the basis of theNixOS Linux distribution (that can be automatically installed from a singledeclarative specification), as well as a number of additional deploymentsolutions, such as NixOps, that deploys virtual machines in the cloud andHydra: the Nix-based continuous integration server. Although Nix offers allkinds of deployment benefits, integration with language-specific packagemanagers that also do dependency management, such as the NPM package manager,is problematic as they conflict with Nix's reliability properties. In thispresentation, I will show `node2nix`, a tool that automatically generates Nixexpressions (build recipes) from an NPM package's `package.json` configurationfile, allowing users to deploy NPM packages with the Nix package mangeralongside other types of packages (e.g. Autotools, Perl, Python, ...) thatconstitute 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