A Nix library that converts npm-based packages into reproducible Nix derivations by parsing package.json and package-lock.json.
npmlock2nix is a Nix library that converts npm-based JavaScript projects into Nix derivations by parsing package.json and package-lock.json files. It solves the problem of integrating Node.js dependencies into the Nix ecosystem, enabling reproducible and pure builds for npm packages.
Nix users and developers who need to manage npm-based projects within Nix workflows, such as those building JavaScript applications or tools with Nix.
Developers choose npmlock2nix for its simplicity, reliability, and adherence to Nix principles, offering a tested and unit-tested solution that works in restricted evaluation and supports GitHub dependencies without auto-generated code.
nixify npm based packages [maintainer=@andir]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses pure Nix expressions without auto-generated code, ensuring better integration and reliability within Nix workflows, as emphasized in the features.
Works in Nix's restricted evaluation mode, enhancing security for builds in controlled environments, a key feature highlighted in the README.
Supports dependencies hosted directly on GitHub, extending beyond standard npm registries for more flexible source management.
Includes both unit and integration tests, ensuring robustness and reliability for production use, as noted in the features and development section.
Requires users to explicitly define buildCommands and installPhase for custom builds, adding complexity compared to more automated tools.
Depends solely on package-lock.json, making it incompatible with projects using yarn.lock or pnpm-lock.yaml without manual conversion or additional steps.
Only useful within Nix-based workflows, requiring setup with niv and overlays, which can be a barrier for teams not invested in Nix.