A simple and convenient dependency pinning tool for Nix projects, supporting git, Nix channels, and PyPi packages.
npins is a command-line tool for pinning dependencies in Nix projects. It allows developers to track and manage external sources like git repositories, Nix channels, and PyPi packages with reproducible hashes. It solves the problem of ensuring consistent dependency versions across different environments and builds.
Nix developers and system administrators who need reliable dependency pinning for reproducible builds, especially those migrating from Niv or managing complex Nix projects with multiple external sources.
npins offers a simpler and more convenient alternative to Niv with additional features like PyPi support, Nix channel tracking with database access, and flexible update controls. Its focus on ease of use and migration tools makes it appealing for Nix users seeking a streamlined workflow.
Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports tracking git repositories from GitHub, GitLab, and Forgejo with efficient fetchTarball for releases, and handles branches, tags, and specific commits, as shown in the add command examples.
Tracks Nix channels directly, providing access to the programs.sqlite database unlike git-based methods, which is highlighted as a key feature in the README.
Allows pinning Python packages from PyPi with version constraints and upper bounds, ensuring reproducible builds for Python dependencies, demonstrated in the add pypi commands.
Includes commands to import pins from Niv or flake.lock files, making transition from other tools straightforward, as detailed in the import-niv and import-flake sections.
The upgrade command can change the sources.json format, which may occasionally break Nix evaluation, as explicitly warned in the README's upgrade help section.
While it supports git, channels, PyPi, containers, and tarballs, it lacks built-in support for other common sources like npm or specific Docker registries beyond OCI containers, limiting ecosystem coverage.
Local development overrides require setting environment variables (NPINS_OVERRIDE_*), which can be impure and error-prone if not managed carefully, as noted in the local sources section.
npins is an open-source alternative to the following products: