Skip to content

Adds a nix flake and support for it#46

Draft
MilitaoLucas wants to merge 12 commits intopeterspackman:mainfrom
MilitaoLucas:nix2
Draft

Adds a nix flake and support for it#46
MilitaoLucas wants to merge 12 commits intopeterspackman:mainfrom
MilitaoLucas:nix2

Conversation

@MilitaoLucas
Copy link
Copy Markdown
Contributor

@MilitaoLucas MilitaoLucas commented Feb 23, 2026

Hello, I did some patches so my OS (NIxOS) can build OCC from source using Nix. Nix is a package manager for Unix, officially supporting Linux and MacOS. Its main objective is extreme reproducibility in builds, as it unsets all environment variables and everything that could make it "work in my machine".

For now there are some problems because Nix doesn't support -march=native and you have to do -march=x86_64v3 or your respective processor version. Those are mainly warnings. Those patches are also made because to ensure reproducibility Nix doesn't allow internet access during builds.

I created this as a draft because it would require changing the CMakeLists.txt for it to work, but the possibilities it opens for easier cross-compilation are nice. Basically this is mainly a proposal instead of a real PR. I do think it would be nice because it could potentially work for MacOS, Linux and Windows with MinGW.

I will open a new PR soon, after refactoring a bit, because I think I finalized everything I needed to implement OCC into NoSpherA2. I just thought I would make this one to see what do you think about making this available as an option.

@MilitaoLucas
Copy link
Copy Markdown
Contributor Author

I think I must've messed something up. But to be fair I wasn't exactly expecting it would try to build on a draft PR.

@peterspackman
Copy link
Copy Markdown
Owner

I'm all for this, I'll try and take some time and dig in to see if there's anything that could cause downstream pain or blocking issues, but in all likelihood I'll just merge this pretty quickly - thanks!

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