Skip to content

Resolve packaging problems#164

Open
JarvisCraft wants to merge 8 commits intozmkfirmware:mainfrom
JarvisCraft:v0.3.1-fixed
Open

Resolve packaging problems#164
JarvisCraft wants to merge 8 commits intozmkfirmware:mainfrom
JarvisCraft:v0.3.1-fixed

Conversation

@JarvisCraft
Copy link
Copy Markdown

@JarvisCraft JarvisCraft commented Jan 12, 2026

While packaging zmk-studio for nixpkgs I've encountered a number of errors which are fixed in this PR:

  • lock-file is outdated: re-generated for version 3;
  • cargo MSRV does not make sense (used tokio version required higher version): upped MSRV;
  • Cargo major.minor tauri version does not match it in the lock-file: updated version.
  • build reqires HTTP access to fetch version info: replaced with passing version to the script;
  • PhysicalLayoutPicker.tsx fails type-check due to unhandled null: declared explicit nullability.

This PR is based on 0.3.1 release

The resulting PR successfully builds using nix:

image

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 12, 2026

Deploy Preview for zmk-studio ready!

Name Link
🔨 Latest commit 14fcc2a
🔍 Latest deploy log https://app.netlify.com/projects/zmk-studio/deploys/6967964fabb17a0008432cb2
😎 Deploy Preview https://deploy-preview-164.preview.zmk.studio
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

edition = "2021"
rust-version = "1.60"
edition = "2024"
rust-version = "1.91.1"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSRV was not real before (for instance, tokio 1.37 had MSRV of 1.63) thus bumped it to pre-latest version of Rust

I don't think that there is a good reason to stick to older version given that this is a binary and not a library, but feel free to request downgrading

default-run = "app"
edition = "2021"
rust-version = "1.60"
edition = "2024"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as with MSRV, no readon to keep it old, but ready to downgrade it

const __dirname = path.resolve(__filename, "../..");

async function generateReleaseData() {
async function generateReleaseData(version) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing HTTP call (every time) just to build the binary every time is quite painful for any distribution (since builds may only pre-fetch locked libraries and then perform the build in isolation) thus switched to explicitly passing the version here and statically generating metadata.

This also provides determinism (builds should not differ on the time of the build, which currently is possible since to latest being volatile) and lets the specific branch/tag be built with the correct version in generated file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regenerated to version 3

@JarvisCraft
Copy link
Copy Markdown
Author

Hi, @petejohanson, @Nicell, apologies for pinging

Could you please take a look at this PR?

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.

1 participant