feat(nix): add Nix flake for desktop app#13
Conversation
Add a Nix flake that builds the Tauri v2 desktop app using cargo-tauri.hook with fetchPnpmDeps + pnpmConfigHook for the pnpm monorepo build. Usage: nix build # build the package nix run # run OpenConcho nix develop # enter dev shell
offendingcommit
left a comment
There was a problem hiding this comment.
Thanks for this — the flake itself is clean and uses the canonical nixpkgs Tauri pattern (cargo-tauri.hook + fetchPnpmDeps + pnpmConfigHook) correctly. We're happy to support Nix as a documented use-case, but it needs to live inside our existing ecosystem without rotting, so I'm requesting a few changes before merge.
Could you share the justification / audience? Our release.yml already ships desktop binaries for macOS, Windows, and Linux via semantic-release + tauri-action. This flake covers platforms.linux only — a subset of what we already publish. Knowing who consumes the flake (NixOS install? reproducible dev shell?) helps us decide how much surface to commit to maintaining.
Changes requested:
-
pnpmDepshash will rot silently. The fixed-outputhashpinspnpm-lock.yamland invalidates on every dependency bump — which is frequent here under semantic-release. We have no Nix job in CI, so this breaks with no signal. Please add anix flake check(ornix build) step to.github/workflows/ci.ymlso the hash is verified on PRs. Without that, the flake is an untested build path the moment the lockfile moves. -
Add a
devShell. A package-only flake helps a narrow audience that already has release binaries. Anix developshell pinning the toolchain (node, pnpm_10, Rust, the GTK/webkit deps) is the part that earns its place in the repo and helps contributors. If the goal is reproducible dev envs, this is the high-value piece. -
version = "0.8.0"duplicatespackage.json. Minor (it only labels the store path, doesn't gate the build), but it'll mislabel after the next release. Please read it frompackage.jsonor drop it from anything load-bearing so it can't drift. -
Optional but ideal: add
aarch64-darwinso the flake covers the platform several of us actually develop on.
Net: wire it so a single dependency bump can't silently break it, give it a devShell, and we'll gladly carry Nix as a supported path. Appreciate the contribution!
Summary
cargo-tauri.hook+fetchPnpmDeps+pnpmConfigHookUsage
Tested