Skip to content

WIP: Make build reproducible with Nix - #17

Open
jeff-hykin wants to merge 12 commits into
treadiehq:mainfrom
jeff-hykin:main
Open

WIP: Make build reproducible with Nix#17
jeff-hykin wants to merge 12 commits into
treadiehq:mainfrom
jeff-hykin:main

Conversation

@jeff-hykin

Copy link
Copy Markdown

I'm not here to really debate this change or convince you to make it, I just really like the tool and wanted to make it reproducible. I didn't want to publish my fork on flakehub without at least checking if you wanted to have it first.

Ex:

# install nix
curl -fsSL https://install.determinate.systems/nix | sh -s -- install --determinate

# install port-kill
nix profile install github:kagehq/port-kill
# that^ would work after this PR, no need to run arbitrary bash scripts get manually get a rust toolchain

Notes:

  1. This shouldn't add any maintainance burden: the flake.nix doesn't need to be edited continually, it pulls changes from the Cargo.lock.
  2. I did need to remove the Cargo.lock from the gitignore. The flake.nix depends on it being committed.
  3. Tested on Linux x86 and MacOS aarch64.
  4. I'm not sure why, but the linux build needed log_level: LogLevel::Info added to Args. It wouldn't compile otherwise, even though it compiled fine on MacOS before and after.

Thanks for making a nice tool like this!

@jeff-hykin

jeff-hykin commented Sep 11, 2025

Copy link
Copy Markdown
Author

Update: I didn't realize there was a graphical version for linux, I only tested the cli version for linux. I probably should convert this PR to WIP because the glib dependency thats a part of ./build-linux.sh is going to be a lot harder to get a working flake for.

@dantelex

dantelex commented Sep 11, 2025

Copy link
Copy Markdown
Member

Update: I didn't realize there was a graphical version for linux, I only tested the cli version for linux. I probably should convert this PR to WIP because the glib dependency thats a part of ./build-linux.sh is going to be a lot harder to get a working flake for.

Sure. Happy to merge to to help Nix build. Add a comment when you make the update and i'll look at merging it. Thank you. @jeff-hykin

@jeff-hykin

jeff-hykin commented Sep 12, 2025

Copy link
Copy Markdown
Author

Great to hear.

I somehow managed to get flake build working for GUI linux on my dev branch. Now I see the complications with macos and linux having different Cargo/Cargo.lock. I haven't found a good solution to that yet since the flake assumes they're static. I'll have to get back to it another time.

@jeff-hykin jeff-hykin changed the title Make build reproducible with Nix WIP: Make build reproducible with Nix Sep 12, 2025
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