A linter for Nix package expressions that identifies common mistakes and provides explanations for Nixpkgs contributors.
nixpkgs-hammering is a specialized linter tool for Nix package expressions that identifies common mistakes and anti-patterns in Nixpkgs. It provides detailed explanations for warnings to help package maintainers improve code quality and adhere to Nix packaging conventions.
Nix package maintainers, especially those reviewing pull requests or learning Nix packaging best practices, and developers contributing packages to Nixpkgs.
It offers targeted, educational feedback that catches subtle packaging errors while teaching Nix idioms, helping maintainers ensure package quality and consistency across the Nixpkgs repository.
Beat your package expressions into a shape
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Combines Nix-based overlays and Rust-based checks to catch a wide range of packaging mistakes, from simple errors to complex anti-patterns via AST parsing.
Provides detailed feedback for each warning, helping users learn Nix idioms and best practices, as emphasized in the project's philosophy.
Uses overlays to apply checks only to specified package attributes, avoiding unnecessary dependency evaluation and improving efficiency.
Offers commands for classic Nix, Flakes, and unstable Nix, making it accessible across different Nix setups as shown in the usage instructions.
The README notes that rules almost always apply but have exceptions, requiring users to manually review warnings to avoid incorrect changes.
New checks must be added to the Git index for discovery, adding an extra step in the development workflow and potentially slowing contributions.
The tool only identifies issues without providing automated fixes, necessitating manual corrections and increasing maintenance effort.