Nur packager

From nix-community/nur-combined · View interactive version

Nur packager is an AI agent skill from the GitHub repository nix-community/nur-combined. Package projects (GitHub repos, npm packages, curl scripts, release binaries) into NUR derivations. Analyzes the project, selects the best packaging strategy, creates the nix derivation, registers it, and tests the build.

How to use this skill

Skill file

NUR Packager

Package projects into Nix User Repository (NUR) derivations end-to-end.

Workflow

  1. Analyze the input (URL, package name, GitHub repo) to determine what it is and how it distributes releases
  2. Select the packaging strategy (npm source build, binary release, GitHub source build, etc.)
  3. Create the derivation under pkgs/<name>/default.nix and register it in the repo root default.nix
  4. Test the build with nix build and verify the result works
  5. Automate updates with a script and GitHub Actions workflow if applicable

Strategy Selection

| Input Type | Strategy | Rule File |

|---|---|---|

| npm/node package on registry | buildNpmPackage or node2nix | npm-packaging |

| GitHub repo with release binaries | Multi-platform fetchurl + hashes | binary-release |

| GitHub repo with source builds | buildGoModule, buildRustPackage, etc. | github-source |

| Curl script / direct download | Extract API, fetch per-platform hashes | binary-release |

| AppImage + DMG | appimageTools / undmg | binary-release |

Quick Reference

| Step | Command |

|---|---|

| Analyze project | Read README, check releases, inspect package.json |

| Create derivation | pkgs/<name>/default.nix |

| Register package | Add name = pkgs.callPackage ./pkgs/name { }; to root default.nix |

| Build | nix build .#<name> |

| Build (unfree) | NIXPKGS_ALLOW_UNFREE=1 nix build --impure .#<name> |

| Test binary | ./result/bin/<name> --help |

| Format check | nix fmt -- --check (if alexnix/fmt or nixfmt is configured) |

| Prefetch hash | nix store prefetch-file --json <url> |

Repo Conventions

Related Skills

Rule Files

| Topic | File |

|---|---|

| Analyzing a project | analyze-project |

| Node.js/npm packaging | npm-packaging |

| Binary release packaging | binary-release |

| GitHub source builds | github-source |

| Creating and registering derivations | create-derivation |

| Testing builds | testing |

| Update automation | update-automation |

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.