mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
* 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>
35 lines
927 B
Nix
35 lines
927 B
Nix
{
|
|
description = "Share skills across AI CLI tools";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs =
|
|
{ self, nixpkgs }:
|
|
let
|
|
systems = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
"aarch64-darwin"
|
|
];
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
|
in
|
|
{
|
|
packages = forAllSystems (pkgs: {
|
|
skillshare = pkgs.callPackage ./nix/package.nix { };
|
|
default = self.packages.${pkgs.stdenv.hostPlatform.system}.skillshare;
|
|
});
|
|
|
|
overlays.default = final: _prev: {
|
|
skillshare = final.callPackage ./nix/package.nix { };
|
|
};
|
|
|
|
checks = forAllSystems (pkgs: {
|
|
skillshare = self.packages.${pkgs.stdenv.hostPlatform.system}.skillshare.overrideAttrs {
|
|
doCheck = true;
|
|
};
|
|
});
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
|
|
};
|
|
}
|