Update custom Nix packages in this repository (Helium, DevToys, agent-browser, opencode-morph-fast-apply). Use when a new version of these packages is released or when dependency hashes need updating. Triggers on "update helium", "bump devtoys version", "fix agent-browser hash", or "update custom packages".
This skill provides comprehensive procedures and guidelines for maintaining and updating custom Nix packages in this repository. These packages are defined in the packages/ directory and are exposed via the flake-parts/packages.nix file.
Custom packages in this repository are managed using Nix flakes and the flake-parts framework. Unlike packages from the official nixpkgs repository, these are maintained locally to ensure specific versions, configurations, or wrappers are available.
Updating these packages involves a systematic process of:
The four primary custom packages handled by this skill are:
packages/helium.nix): A lightweight web browser distributed as an AppImage.packages/devtoys.nix): A Swiss Army knife for developers, extracted from a Debian package.packages/opencode-morph-fast-apply.nix): An OpenCode plugin built using buildNpmPackage.packages/agent-browser.nix): A complex tool combining a pnpm-based Node.js app and a Rust CLI.If you are already familiar with Nix, follow these accelerated steps:
packages/.version variable and any architecture-specific URLs.sha256, hash, or cargoHash values to lib.fakeHash.nix build .#<package-name>.agent-browser), repeat the build/fix cycle for each one../result/bin/ works as expected.Helium is wrapped using pkgs.appimageTools.wrapType2. It uses a multi-architecture mapping to support both x86_64 and aarch64.
File: packages/helium.nix
Update Procedure:
0.8.5.1).version = "..." line at the top of the let block.sha256 values in the srcs attribute set with lib.fakeHash.nix build .#helium. Nix will provide the hash for your current architecture.# Structure of helium.nix for reference
srcs = {
x86_64-linux = {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-x86_64.AppImage";
sha256 = "sha256-y4KzR+pkBUuyVU+ALrzdY0n2rnTB7lTN2ZmVSzag5vE="; # Update this
};
aarch64-linux = {
url = "https://github.com/imputnet/helium-linux/releases/download/${version}/helium-${version}-arm64.AppImage";
sha256 = "sha256-fTPLZmHAqJqDDxeGgfSji/AY8nCt+dVeCUQIqB80f7M="; # Update this
};
};
DevToys is updated by extracting a .deb file using dpkg-deb.
File: packages/devtoys.nix
Update Procedure:
version variable.sha256 hashes in the srcs block..deb file changes, update the url template accordingly.nix build .#devtoys.Verification: Since DevToys relies on makeWrapper to set the execution environment, verify the wrapper:
cat result/bin/devtoys # Should show the shell script invoking the real binary
This package uses the buildNpmPackage helper. It is often pinned to a specific commit because it is a fast-moving plugin.
File: packages/opencode-morph-fast-apply.nix
Update Procedure:
version (use the date or the version from package.json).src.rev with the new commit hash.src.sha256 using lib.fakeHash.npmDepsHash using lib.fakeHash. This hash represents the node_modules state and must be updated whenever package-lock.json changes.pkgs.buildNpmPackage {
pname = "opencode-morph-fast-apply";
version = "1.5.1"; # Update
src = pkgs.fetchFromGitHub {
owner = "JRedeker";
repo = "opencode-morph-fast-apply";
rev = "new-rev-here"; # Update
sha256 = lib.fakeHash; # Update
};
npmDepsHash = lib.fakeHash; # Update
}
This is the most complex package in the repository. It contains two distinct build processes: a Rust CLI and a pnpm-managed Node.js application.
File: packages/agent-browser.nix
Update Procedure:
rustCli.version.rustCli.src.tag or rustCli.src.hash.rustCli.cargoHash. This is critical for Rust dependency reproducibility.version variable.src.tag or src.hash in the main mkDerivation.pnpmDeps.hash. This requires fetcherVersion = 2; for compatibility with pnpm 9.nix build .#agent-browser and resolve hashes one by one.Important: The Rust CLI is built separately and then copied into the final derivation. Ensure both parts are updated to matching versions to avoid compatibility issues.
You can use these snippets to check for updates without opening a browser:
# Get latest Helium version
curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | jq -r .tag_name
# Get latest DevToys version
curl -s https://api.github.com/repos/DevToys-app/DevToys/releases/latest | jq -r .tag_name
# Get latest agent-browser version
curl -s https://api.github.com/repos/vercel-labs/agent-browser/releases/latest | jq -r .tag_name
The "Fake Hash Pattern" is the recommended way to update hashes in this repository.
sha256 or hash with lib.fakeHash. This is a constant that evaluates to an empty hash string, which Nix recognizes as a placeholder.nix build .#<package>.got: line in the error message. It will look like sha256-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=.lib.fakeHash with the captured string.Note: In some cases, Nix might report the hash in SRI format (starting with sha256-) even if the original used a different format. Always prefer the SRI format.
After applying updates, you MUST verify the build:
# Build the package locally
nix build .#helium
# Check the binary is in the correct path
ls -l result/bin/helium
# Run a simple version check if supported
./result/bin/helium --version
If you are updating a Linux-only package (like helium or devtoys) from a Darwin system, you will not be able to build it locally unless you have a Linux remote builder. In such cases:
lib.fakeHash.If you update helium.nix or devtoys.nix and get a hash mismatch immediately but the hash looks "correct", check if you accidentally swapped the x86_64 and aarch64 hashes.
If buildNpmPackage fails with a hash mismatch on npmDepsHash, it means the package-lock.json has changed. This is expected during a version bump. If it fails without a version bump, the upstream might have force-pushed or changed a dependency in place (rare but possible).
In agent-browser.nix, the cargoHash must be updated if any dependency in Cargo.toml or Cargo.lock changes. If the Rust build fails with "checksum mismatch for vendor source", your cargoHash is outdated.
If the application builds but fails at runtime with "libX11.so.6 not found" (common for AppImages), you need to add the missing library to extraPkgs in helium.nix or buildInputs in devtoys.nix.
bash, git, or ripgrep. These are managed by updating the nixpkgs input in flake.nix.packages/, use the nix-package-creator skill instead to create the initial derivation.neovim package in this repo is a complex wrapper around nvf and should be updated by modifying the nvf modules in modules/home-manager/features/neovim/nvf.