← ClaudeAtlas

nix-initlisted

Generates Nix packages from repository URLs using nix-init — hash prefetching, dependency inference, and license detection included. Use this skill whenever the user wants to package a GitHub/GitLab/Gitea repo for Nix, add a tool or library that is missing from nixpkgs to their flake or home-manager config, prepare a pkgs/by-name contribution, or mentions nix-init directly. Also use it when asked to "package X for Nix", "create a derivation from this URL", "add this repo as a Nix package", or to fix/verify packages originally scaffolded with nix-init.
atvari-eu/nix-skills · ★ 0 · AI & Automation · score 70
Install: claude install-skill atvari-eu/nix-skills
# Nix Init [nix-init](https://github.com/nix-community/nix-init) scaffolds a complete Nix package from a repository URL: it picks the fetcher, prefetches the source and dependency hashes via nurl, infers the build system (Rust, Go, Python) and its dependencies, and detects the license. The generated file is a strong starting point, not a finished package — upstream warns that tweaks are usually required. Always verify the result before handing it back (see Verification). ## Running nix-init Check if `nix-init` is on PATH first. If not, run it through nix: ```bash nix run nixpkgs#nix-init -- <args> # latest packaged release ``` ## Non-interactive invocation Agents cannot answer nix-init's fuzzy interactive prompts, so always pass `--headless`. It requires `--url`; everything else gets inferred unless you specify it explicitly. ```bash nix run nixpkgs#nix-init -- --headless \ -u 'https://github.com/owner/repo' \ --overwrite=true \ /path/to/package.nix ``` ### Flags worth knowing - `-u/--url` — **always pass full HTTPS URLs** (`https://github.com/owner/repo`, `https://gitlab.com/...`, `https://codeberg.org/...`). Short forms like `github:owner/repo` get mangled into an invalid `git+github:` fetcher and fail. - `--rev` + `-V/--version` — pin a specific tag and its version. Pass both together or neither: `-V 1.2.3` without `--rev` leaves the source pinned to the *latest* tag while claiming version 1.2.3. With neither, nix-init tracks the latest rel