Implement macOS support using sandbox-exec and refactor for multi-platform support#18
Conversation
Extracted Darwin-specific implementation from `features.nix` and `wrapper.nix` into `modules/flake-parts/landrun/sandbox-exec/`. Common configuration was extracted to `modules/flake-parts/landrun/common.nix`. The original files now import these modules and conditionally apply configurations based on `pkgs.stdenv.isDarwin`. This improves code organization and maintainability by separating platform-specific logic. Co-authored-by: adrian-gierakowski <330177+adrian-gierakowski@users.noreply.github.com>
|
CI ( I do have sandbox-exec: |
|
@srid unfortunately one cannot run the only way to test this on macos is to run: you should be able to run this for free on gh actions |
|
@adrian-gierakowski I think we can just use GitHub Actions for this project. Would you be able to address the CI errors? Also seeing your interest I just added you as collaborator to this repo. No particular responsibilities or expectations; but this way at least you can trigger CI without me approving it each time. |
|
Aside: I'm planning to switch from Antigravity back to Claude Code, so this PR would be use to me personally as well on macOS! |
1ada6e9 to
44e3245
Compare
This reverts commit b4ccd84.
|
@srid all fixed bumped nixbuild/nix-quick-install-action@v34 (installs nix 2.29.x vs 2.24.x before) |
and use it to set name = "claude" in claude example
I'm testing on: not sure why unset would be called with an option cause it is not: is there an env var which starts with "--" ? maybe this helps (in since it's currently using
default comes from here and here (it's the same on linux on main) fixed in last commit |
|
ah, still broken:
needs meta.mainProgram |
Still no luck, looks like |
This reverts commit 905091f. see: srid#18 (comment)
This reverts commit 074dc3d. see: srid#18 (comment)
This reverts commit bd596a4. see: srid#18 (comment)
f3fa36a to
18f2890
Compare
|
reverted the attempts to fix bin name in the claude example, you'll either have to live with btw. I'm running |
actually, something else is at play, just tested with minimal flake and it works with mainProgram etc |
18f2890 to
aac4746
Compare
|
it was this all done now |
This reverts commit 905091f. not needed as it's set by writeShellApplication
|
all done now, if you still get this weird |
|
To reproduce this, clone https://github.com/srid/haskell-template and run |
cf33a7b to
664d588
Compare
|
@srid should be fixed now, managed to reproduce locally and latest commit fixes it |
|
Great; I've tested it and it works. The only thing left to do is update the README (otherwise it will become misleading). Do you want to do the project rename in this PR or in next PR? |
Can we merge first and do rename and readme in follow up? Thanks! |
thanks, I had this waiting, so let's merge as well and I'll prep the rename #21 |




This PR implements macOS support for
landrun-nixusing the nativesandbox-executility and refactors the codebase to better support multiple platforms.Key Changes:
common,linux, anddarwinsubdirectories.modules/flake-parts/landrun/common/features.nix.sandbox-exec):tests/test.batswith more robust test cases.tests/flake.nixfor better testing of the landrun modules.Verification: