Skip to content

Comments

flake.nix: add macOS (Darwin) support#393

Open
randomizedcoder wants to merge 1 commit intoespotek-org:masterfrom
randomizedcoder:darwin
Open

flake.nix: add macOS (Darwin) support#393
randomizedcoder wants to merge 1 commit intoespotek-org:masterfrom
randomizedcoder:darwin

Conversation

@randomizedcoder
Copy link
Contributor

G'day Chris,

I just created the nixpkgs pull request, so it will be easy for people to see Labrador is supported by Nixpkgs. Once merged it will also sort of make the Flake redundant.
NixOS/nixpkgs#477199

However, I noticed that I would also improve the platform support adding Darwin to the flake.

  • Add platform detection for Darwin vs Linux
  • Handle different libdfuprog paths and extensions (.so/.dylib)
  • Use appropriate library path env var (LD_LIBRARY_PATH/DYLD_LIBRARY_PATH)
  • Handle binary name differences (labrador/Labrador)
  • Install icons and desktop files only on Linux
  • Use sysctl fallback for CPU count on macOS
  • Update platforms to include darwin

I don't have a recent Apples devices, so this is untested.

Thanks,
Dave

- Add platform detection for Darwin vs Linux
- Handle different libdfuprog paths and extensions (.so/.dylib)
- Use appropriate library path env var (LD_LIBRARY_PATH/DYLD_LIBRARY_PATH)
- Handle binary name differences (labrador/Labrador)
- Install icons and desktop files only on Linux
- Use sysctl fallback for CPU count on macOS
- Update platforms to include darwin
@EspoTek
Copy link
Collaborator

EspoTek commented Jan 5, 2026

If it's not possible to test on macOS, I think we just keep support limited to Linux.

@randomizedcoder
Copy link
Contributor Author

Makes sense. If we do find somebody with Darwin, then it would be great to test it!

@mi-hol
Copy link
Contributor

mi-hol commented Jan 6, 2026

find somebody with Darwin,

While this is "developer speak" I believe it means any macOS or iOS version should work for testing.
@EspoTek I though you'd own at least one device running macOS

@mi-hol
Copy link
Contributor

mi-hol commented Feb 17, 2026

@randomizedcoder I have never heard of NixOS before and had just a little bit of reading.

Therefore I ask myself:
How will this package find its way into the official NixOS repo so the search https://search.nixos.org/flakes?channel=25.11&query=Labrador will find it?

@randomizedcoder
Copy link
Contributor Author

If you are still using a non-deterministic operation system (e.g. Debian or Ubuntu), then it's definitely time to try NixOS

I submitted the pull request a while back
NixOS/nixpkgs#477199

Looks like I need to fix the pull request

@EspoTek
Copy link
Collaborator

EspoTek commented Feb 19, 2026

Let us know when both PRs are ready to go and we can merge them together.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants