$ show berberman/nvfetcher
nvfetcher is a Haskell-based CLI tool and library for automating Nix package updates. It integrates with nvchecker to monitor upstream version releases and uses the Shake build system to manage dependency tracking and incremental builds. The tool processes package definitions (from TOML config or Haskell DSL), fetches source code using appropriate methods (git, GitHub, URL, tarball, Docker), optionally extracts files, processes Rust Cargo.lock dependencies, and generates Nix expressions and JSON metadata for use in Nixpkgs. The architecture is modular with clear separation of concerns: configuration parsing, core logic, fetching mechanisms, version checking, extraction, and Nix expression generation.
The LLM identified 1 files worth highlighting for reuse:
This module provides a clean abstraction over different source fetching mechanisms (git, GitHub, URL, tarball, Docker) by defining a NixFetcher GADT and constructor functions for each source type. It encapsulates the complexity of calling nix-prefetch-* tools and converting their output to the proper SRI format. The core abstraction (data types and constructor functions) is decoupled from the Shake-specific implementation details, making it potentially reusable in other Nix-related tools with minimal adaptation. It demonstrates strong design in handling the varied requirements of different fetch methods while maintaining a uniform interface.