AdditiveFOAM icon indicating copy to clipboard operation
AdditiveFOAM copied to clipboard

nix build

Open wd15 opened this issue 1 month ago • 3 comments

Adapts a Nix build for OpenFOAM 12 to OpenFOAM 10 and subsequent build of AdditiveFOAM to work with the existing build of ExaCA.

  • Tested on some of the tutorials.
  • The Nix files could be moved to envs/nix in a similar manner to the ExaCA Nix build. Let me know your preference.
  • For reference the ExaCA PR might be helpful to answer some questions
  • Using the AMB2018-02-B from the tutorials as the check for Nix. Is there a better choice as a quick check?

Edit:

  • To install from the current branch use nix develop github:wd15/AdditiveFOAM/nix. Installation instructions will only work after the merge.

Edit again:

  • Moved to envs/nix so use nix develop github:wd15/AdditiveFOAM/nix?dir=envs/nix to build

wd15 avatar Nov 21 '25 22:11 wd15

This only currently works with x86_64-linux. Are there other platforms that AdditiveFOAM is typically build it? Can also enable aarch66, aarch64-darwin and x86-64-darwin if you think ExaCA + dependencies would build on those platforms.

wd15 avatar Nov 25 '25 16:11 wd15

Furthermore, I can cache the binaries for x86-64 once we have resolved any issues. It's free for open source projects. That should make the build very fast.

wd15 avatar Nov 25 '25 16:11 wd15

Furthermore, I can cache the binaries for x86-64 once we have resolved any issues. It's free for open source projects. That should make the build very fast.

That's good news, the OpenFOAM nix build is quite slow. I'm building it now, so once that finishes and I can test, I'll re-review.

This only currently works with x86_64-linux. Are there other platforms that AdditiveFOAM is typically build it? Can also enable aarch66, aarch64-darwin and x86-64-darwin if you think ExaCA + dependencies would build on those platforms.

I don't know of any users typically using anything besides x86_64-linux architectures, so that seems fine for now and we can add support if we get user requests.

gknapp1 avatar Nov 25 '25 20:11 gknapp1

@gknapp1: just a note that I added cached the AdditiveFOAM binary dependencies to Cachix so the nix build should go much faster. To test it you would need to remove all the dependencies from your current Nix installation or use a different Nix store. Just using a Nix installation on a different machine is probably easier.

wd15 avatar Dec 03 '25 18:12 wd15

@gknapp1 @streeve This should be good now. No more changes.

wd15 avatar Dec 10 '25 16:12 wd15