Skip to content

Add a Nix flake for source-based installs - #209

Open
y0usaf wants to merge 1 commit into
schpet:mainfrom
y0usaf:nix-flake
Open

y0usaf wants to merge 1 commit into
schpet:mainfrom
y0usaf:nix-flake

Conversation

@y0usaf

@y0usaf y0usaf commented Apr 9, 2026 •

Copy link
Copy Markdown

Summary

  • add a flake.nix + flake.lock for Nix users
  • package linear from source with rustPlatform.buildRustPackage, reading Cargo.lock directly

Notes

  • no hashes in the flake, so version and dependency bumps need no refreshes
  • doCheck = false because a few keyring tests hardcode /bin/cat, /bin/sleep and /bin/kill, which do not exist in the Nix sandbox
  • verified with nix build .#linear and ./result/bin/linear --version

@schpet

schpet commented Oct 8, 2026

Copy link
Copy Markdown
Owner

sorry i didn't get to this. wanted to know, now that this is rust, if you have a suggestion on how to make it more easily available to nix users? i could put it on cargo or whatever if that's useful.

@y0usaf

y0usaf commented Oct 9, 2026

Copy link
Copy Markdown
Author

@schpet I think it's even easier to handle if it's on Rust compared to TS, and thanks for porting!
I'll update and let you know when it's ready to go.

You can put it on Cargo, too, and Nix users can package it themselves in their downstream configurations, but having an upstream flake is preferred, provided you as the maintainer are comfortable with that.

@schpet

schpet commented Oct 9, 2026

Copy link
Copy Markdown
Owner

sure! yeah i just want to do whatever is normal for nix users. so if cargo is not needed i will not bother and just keep it in the repo. thanks for offering to help! i will spin up a nix vm at some point to try and understand it too.

Package the binary with rustPlatform.buildRustPackage and read
Cargo.lock directly, so version and dependency bumps need no hash
refreshes. Tests stay off in the sandbox because a few keyring tests
hardcode /bin/cat, /bin/sleep and /bin/kill.
@y0usaf

y0usaf commented Oct 20, 2026

Copy link
Copy Markdown
Author

Rebased onto the Rust rewrite. It's a plain buildRustPackage off Cargo.lock now, so there's no hash to bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants