Files
Charitarth ChughandClaude Opus 5.5 64c8a3f34e feat: add Nix flake and handle Nix-store installs in upgrade (#764)
* feat: add Nix flake and stop self-upgrade of Nix-store installs

Add flake.nix with packages, overlays.default, checks and a formatter,
building nix/package.nix with the unit tests in the Nix sandbox. The
version comes from the Release Please manifest, so releases need no Nix
edit. A Nix workflow runs `nix flake check` on non-docs changes.

`skillshare upgrade` now detects binaries under /nix/store/ and prints
`nix profile upgrade skillshare` instead of replacing a read-only store
path; update notices and doctor suggest the same command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(upgrade): give Nix installs the right update path everywhere

The first flake commit sent every /nix/store binary to `nix profile
upgrade`, failed a plain `skillshare upgrade` with exit 1 even when the
CLI was current, and left the dashboard with a generic 500.

- Tell `nix profile` installs (the profile manifest lists the store path)
  from NixOS, Home Manager and overlay installs, which are told to update
  their configuration and rebuild. Detection lives in one helper shared by
  the update notice, doctor, upgrade and the dashboard.
- `upgrade` on Nix reports "already up to date" or prints the hint and
  exits 0; the built-in skill still updates.
- The dashboard runs the upgrade so the skill updates, then answers
  409 `upgrade.nix` with the command when a newer CLI waits on Nix. The
  UI shows localized text for it in all 11 locales.
- Installs skip the unit tests; the flake's checks enable them. postPatch
  lowers only the go directive's patch version and fails evaluation with
  a clear message when go.mod needs a newer Go minor. CI also builds the
  package on macOS.
- Docs, translations, the built-in skill reference and the release topic
  describe the new behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:53:57 +08:00

28 lines
567 B
JSON

{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1792502884,
"narHash": "sha256-IoNisKcGbUjdd45qCqywGMCYmZ5EnkxezvLII0FWwNA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "02c087f3fe673c9e317f206a627cb6b910336dbe",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}