This patch is outdated, but illustrates what you're looking for: https://github.com/MarcWeber/nixpkgs/commit/ad6ec783bb61e80f90d6e6ee9e0b2d026982fbbe There is npm2nix utility you have to install. Marc Weber