Change:
Bun should have an auto-update field so that it can be automatically updated. N/A Please run and paste the result.
This issue has been mentioned on NixOS Discourse. There might be relevant details there:

Discussion:
<del> { stdenvNoCC, callPackage, fetchurl, autoPatchelfHook, unzip, openssl, lib }: let dists = { aarch64-darwin = { arch = "aarch64"; shortName = "darwin"; sha256 = "sha256-R17Ga4C6PSxfL1bz6IBjx0dYFmX93i0y8uqxG1eZKd4="; }; aarch64-linux = { arch = "aarch64"; shortName = "linux"; sha256 = "sha256-KSC4gdsJZJoPjMEs+VigVuqlUDhg4sL054WRlAbB+eA="; }; </del> <ins> { lib , stdenvNoCC , callPackage , fetchurl , autoPatchelfHook , unzip , openssl , writeShellScript , curl , jq , common-updater-scripts }: </ins> <del> x86_64-darwin = { arch = "x64"; shortName = "darwin"; sha256 = "sha256-CVqFPvZScNTudE2wgUctwGDgTyaMeN8dUNmLatcKo5M="; }; x86_64-linux = { arch = "x64"; shortName = "linux"; sha256 = "sha256-N3hGPyp9wvb7jjpaFLJcdNIRyLvegjAe+MiV2aMS1nE="; }; }; dist = dists.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); in </del> stdenvNoCC.mkDerivation rec { <del> version = "0.1.11"; </del> <ins> version = "0.1.13"; </ins> pname = "bun"; <del> src = fetchurl { url = "https://github.com/Jarred-Sumner/bun-releases-for-updater/releases/download/bun-v${version}/bun-${dist.shortName}-${dist.arch}.zip"; sha256 = dist.sha256; }; </del> <ins> src = passthru.sources.${stdenvNoCC.hostPlatform.system} or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}"); </ins> strictDeps = true; nativeBuildInputs = [ unzip ] ++ lib.optionals stdenvNoCC.isLinux [ autoPatchelfHook ];

install -Dm 755 ./bun $out/bin/bun runHook postInstall ''; <ins> passthru = { sources = { "aarch64-darwin" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-aarch64.zip"; sha256 = "RYTRcc8xccRmxuKOXwX3bBWJSXLI2/XfH4/7ZdcUBdE="; }; "aarch64-linux" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-aarch64.zip"; sha256 = "LixLrzSsgbXyfpFKiksM4zNS5iDU3tXOrr7fP8yJknM="; }; "x86_64-darwin" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-darwin-x64.zip"; sha256 = "SGZcT2uVy6egr99FzyaykUWLuZBqDsvbCM/lsgy//g0="; }; "x86_64-linux" = fetchurl { url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64.zip"; sha256 = "ssZtJi+CEVn7MjPMqFkwv1lnwE7a7ttkmiuoT0Y6wao="; }; }; updateScript = writeShellScript "update-bun" '' set -o errexit export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}" NEW_VERSION=$(curl --silent https://api.github.com/repos/oven-sh/bun/releases/latest | jq '.tag_name | ltrimstr("bun-v")' --raw-output) if [[ "${version}" = "$NEW_VERSION" ]]; then echo "The new version same as the old version." exit 0 fi for platform in ${lib.escapeShellArgs meta.platforms}; do update-source-version "bun" "0" "${lib.fakeSha256}" --source-key="sources.$platform" update-source-version "bun" "$NEW_VERSION" --source-key="sources.$platform" done ''; }; </ins> meta = with lib; { homepage = "https://bun.sh"; changelog = "https://github.com/Jarred-Sumner/bun/releases/tag/bun-v${version}";

lgpl21Only # javascriptcore and webkit ]; maintainers = with maintainers; [ DAlperin jk ]; <del> platforms = builtins.attrNames dists; </del> <ins> platforms = builtins.attrNames passthru.sources; </ins> }; }