From cbb4c4dec49d8969d6e35be6b248eff1231f89bd Mon Sep 17 00:00:00 2001 From: Hare Date: Fri, 29 May 2026 01:42:09 +0900 Subject: [PATCH] ticket: close nix packaging --- .../artifacts/.gitkeep | 0 .../20260528-152959-nix-packaging/item.md | 4 +- .../resolution.md | 73 +++++++++++++++ .../20260528-152959-nix-packaging/thread.md | 88 +++++++++++++++++++ .../20260528-152959-nix-packaging/thread.md | 7 -- 5 files changed, 163 insertions(+), 9 deletions(-) rename work-items/{open => closed}/20260528-152959-nix-packaging/artifacts/.gitkeep (100%) rename work-items/{open => closed}/20260528-152959-nix-packaging/item.md (98%) create mode 100644 work-items/closed/20260528-152959-nix-packaging/resolution.md create mode 100644 work-items/closed/20260528-152959-nix-packaging/thread.md delete mode 100644 work-items/open/20260528-152959-nix-packaging/thread.md diff --git a/work-items/open/20260528-152959-nix-packaging/artifacts/.gitkeep b/work-items/closed/20260528-152959-nix-packaging/artifacts/.gitkeep similarity index 100% rename from work-items/open/20260528-152959-nix-packaging/artifacts/.gitkeep rename to work-items/closed/20260528-152959-nix-packaging/artifacts/.gitkeep diff --git a/work-items/open/20260528-152959-nix-packaging/item.md b/work-items/closed/20260528-152959-nix-packaging/item.md similarity index 98% rename from work-items/open/20260528-152959-nix-packaging/item.md rename to work-items/closed/20260528-152959-nix-packaging/item.md index 0bf15e78..8fd15518 100644 --- a/work-items/open/20260528-152959-nix-packaging/item.md +++ b/work-items/closed/20260528-152959-nix-packaging/item.md @@ -2,12 +2,12 @@ id: 20260528-152959-nix-packaging slug: nix-packaging title: Package Insomnia with Nix -status: open +status: closed kind: task priority: P2 labels: [packaging, nix, distribution] created_at: 2026-05-28T15:29:59Z -updated_at: 2026-05-28T15:55:18Z +updated_at: 2026-05-28T16:42:08Z assignee: null legacy_ticket: null --- diff --git a/work-items/closed/20260528-152959-nix-packaging/resolution.md b/work-items/closed/20260528-152959-nix-packaging/resolution.md new file mode 100644 index 00000000..8fd15518 --- /dev/null +++ b/work-items/closed/20260528-152959-nix-packaging/resolution.md @@ -0,0 +1,73 @@ +--- +id: 20260528-152959-nix-packaging +slug: nix-packaging +title: Package Insomnia with Nix +status: closed +kind: task +priority: P2 +labels: [packaging, nix, distribution] +created_at: 2026-05-28T15:29:59Z +updated_at: 2026-05-28T16:42:08Z +assignee: null +legacy_ticket: null +--- + +## Background + +Insomnia should be easy to install and run on Nix/NixOS systems without requiring each user to hand-roll a local derivation. Add a Nix packaging entry point suitable for development and user installation. + +This ticket is about packaging and installability, not changing runtime behavior. The package should build the Rust workspace binaries and include the runtime resources needed by the installed commands. + +## Existing Nix file layout + +The repository already separates the Nix package definition from the developer shell: + +- `package.nix` is the package derivation used for install/build outputs. +- `devshell.nix` is for the development shell only. +- `flake.nix` may remain the entry point, but package outputs should call/use `package.nix`. + +Do not implement the installable package primarily in `devshell.nix`. Update `devshell.nix` only if the development shell genuinely needs small supporting changes. + +## Requirement + +- Add Nix packaging for the repository. + - Use `package.nix` for the installable derivation. + - `flake.nix` should expose package outputs by importing/calling `package.nix`. + - Keep `devshell.nix` scoped to development shell concerns. + - Provide package outputs for the user-facing binaries, at minimum the Pod CLI and TUI binaries produced by the workspace. + - Provide a dev shell or equivalent developer environment if it can be done without large scope creep. +- Ensure runtime resources are included or discoverable. + - Built-in prompts/resources required at runtime must be packaged in the derivation output. + - Installed binaries should not rely on the source checkout layout unless explicitly running in development mode. +- Keep local/user configuration separate from packaged resources. + - Packaging should not bake user manifests, provider keys, sessions, memory, or runtime state into the derivation. + - Existing XDG / `INSOMNIA_*` path behavior should remain the source of user config/data/runtime locations. +- Make the package reproducible and CI-friendly. + - Pin inputs through the flake lock if a flake is used. + - Avoid network access during the build. + - Vendor or hash Cargo dependencies through normal Nix Rust packaging mechanisms. +- Document usage. + - How to build the package. + - How to run TUI/Pod binaries from Nix. + - How user config is discovered. + - Known limitations. + +## Acceptance criteria + +- `package.nix` contains the installable package derivation and is used by `flake.nix` package outputs. +- `nix build` or the documented equivalent builds the package from a clean checkout. +- Installed binaries can find built-in resources/prompts at runtime. +- User config/data/runtime paths continue to resolve through existing path logic and are not stored in the Nix store. +- A minimal smoke test or check verifies at least command startup/help/version without requiring real provider credentials. +- Documentation exists for Nix users. +- Packaging files are formatted by the relevant Nix formatter if one is adopted. +- `cargo fmt --check` +- Existing Rust checks affected by packaging changes still pass, or packaging-only validation is clearly documented. + +## Out of scope + +- Publishing to nixpkgs. +- NixOS module / Home Manager module. +- Packaging external LLM providers or model runtimes. +- Secret management for provider API keys. +- Changing manifest/path semantics specifically for Nix unless a separate design decision is made. diff --git a/work-items/closed/20260528-152959-nix-packaging/thread.md b/work-items/closed/20260528-152959-nix-packaging/thread.md new file mode 100644 index 00000000..108a0182 --- /dev/null +++ b/work-items/closed/20260528-152959-nix-packaging/thread.md @@ -0,0 +1,88 @@ + + +## Created + +Created by tickets.sh create. + +--- + + + +## Closed + +--- +id: 20260528-152959-nix-packaging +slug: nix-packaging +title: Package Insomnia with Nix +status: closed +kind: task +priority: P2 +labels: [packaging, nix, distribution] +created_at: 2026-05-28T15:29:59Z +updated_at: 2026-05-28T16:42:08Z +assignee: null +legacy_ticket: null +--- + +## Background + +Insomnia should be easy to install and run on Nix/NixOS systems without requiring each user to hand-roll a local derivation. Add a Nix packaging entry point suitable for development and user installation. + +This ticket is about packaging and installability, not changing runtime behavior. The package should build the Rust workspace binaries and include the runtime resources needed by the installed commands. + +## Existing Nix file layout + +The repository already separates the Nix package definition from the developer shell: + +- `package.nix` is the package derivation used for install/build outputs. +- `devshell.nix` is for the development shell only. +- `flake.nix` may remain the entry point, but package outputs should call/use `package.nix`. + +Do not implement the installable package primarily in `devshell.nix`. Update `devshell.nix` only if the development shell genuinely needs small supporting changes. + +## Requirement + +- Add Nix packaging for the repository. + - Use `package.nix` for the installable derivation. + - `flake.nix` should expose package outputs by importing/calling `package.nix`. + - Keep `devshell.nix` scoped to development shell concerns. + - Provide package outputs for the user-facing binaries, at minimum the Pod CLI and TUI binaries produced by the workspace. + - Provide a dev shell or equivalent developer environment if it can be done without large scope creep. +- Ensure runtime resources are included or discoverable. + - Built-in prompts/resources required at runtime must be packaged in the derivation output. + - Installed binaries should not rely on the source checkout layout unless explicitly running in development mode. +- Keep local/user configuration separate from packaged resources. + - Packaging should not bake user manifests, provider keys, sessions, memory, or runtime state into the derivation. + - Existing XDG / `INSOMNIA_*` path behavior should remain the source of user config/data/runtime locations. +- Make the package reproducible and CI-friendly. + - Pin inputs through the flake lock if a flake is used. + - Avoid network access during the build. + - Vendor or hash Cargo dependencies through normal Nix Rust packaging mechanisms. +- Document usage. + - How to build the package. + - How to run TUI/Pod binaries from Nix. + - How user config is discovered. + - Known limitations. + +## Acceptance criteria + +- `package.nix` contains the installable package derivation and is used by `flake.nix` package outputs. +- `nix build` or the documented equivalent builds the package from a clean checkout. +- Installed binaries can find built-in resources/prompts at runtime. +- User config/data/runtime paths continue to resolve through existing path logic and are not stored in the Nix store. +- A minimal smoke test or check verifies at least command startup/help/version without requiring real provider credentials. +- Documentation exists for Nix users. +- Packaging files are formatted by the relevant Nix formatter if one is adopted. +- `cargo fmt --check` +- Existing Rust checks affected by packaging changes still pass, or packaging-only validation is clearly documented. + +## Out of scope + +- Publishing to nixpkgs. +- NixOS module / Home Manager module. +- Packaging external LLM providers or model runtimes. +- Secret management for provider API keys. +- Changing manifest/path semantics specifically for Nix unless a separate design decision is made. + + +--- diff --git a/work-items/open/20260528-152959-nix-packaging/thread.md b/work-items/open/20260528-152959-nix-packaging/thread.md deleted file mode 100644 index 501bf249..00000000 --- a/work-items/open/20260528-152959-nix-packaging/thread.md +++ /dev/null @@ -1,7 +0,0 @@ - - -## Created - -Created by tickets.sh create. - ----