How to run an update script from an installed package

I’ve installed claude and it comes with this update script claude-code: init at 0.2.9 by malob · Pull Request #384860 · NixOS/nixpkgs · GitHub .

The installed version is out of date. How do I actually run it to update?

I’m new to nix and using nix-darwin with a flake file.

Thanks for any hints.

This readme might be of help: nixpkgs/pkgs/README.md at f46f985238e3b1c70138c6f3d8edcacd97710736 · NixOS/nixpkgs · GitHub

This section will tell you how to run the update script: nixpkgs/pkgs/README.md at f46f985238e3b1c70138c6f3d8edcacd97710736 · NixOS/nixpkgs · GitHub

If you run the update helper in your local nixpkgs clone, it’ll update the derivation as necessary. I ran nix run .#claude-code -- --version and got 1.0.24 (Claude Code) which appears to be the latest version

To get the latest claude-code you’ll need to pull it from the unstable nixpkgs branch, stable doesn’t always get back ports.

Recommend asking claude sonnet (free) or DeepSeek R1 some of the ways to do that and then pick the fix that works best for your intended setup (i.e. maybe you want to track all packages again unstable or maybe you just want to cherry-pick Claude code and some others).