Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell.nix with an environment for building and using Clad on NixOS #973

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

guitargeek
Copy link
Contributor

I use this nix environment to build Clad standalone and test the reproducers.

Until recently, I could just use my native Arch Linux environment to do
so, but after Arch dropped LLVM 17 this was not possible anymore (Clad
doesn't work the LLVM 18 yet). Therefore, I had to find another
solution, and nix packages works quite well.

It would be nice to have this in the repo so also other people can work
with Clad in NixOS, without having to waste time figuring out the
dependencies and necessary CMake flags.

Also, add a flag CLAD_DISABLE_TESTS to the build system, so that Clad can be built without the hack of resetting the compiler flags temporarily by hand.

The testing and benchmarking relies on a hack that temporariliy changes
the compiler flags. This doesn't work in all environments, and it would
be nice if the the tests could be disabled so it's possible to build
Clad without this hack.

This makes it possible to build Clad on NixOS.
I use this nix environment to build Clad standalone and test the reproducers.

Until recently, I could just use my native Arch Linux environment to do
so, but after Arch dropped LLVM 17 this was not possible anymore (Clad
doesn't work the LLVM 18 yet). Therefore, I had to find another
solution, and nix packages works quite well.

It would be nice to have this in the repo so also other people can work
with Clad in NixOS, without having to waste time figuring out the
dependencies and necessary CMake flags.
Copy link
Owner

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know nothing about Nix but that LGTM ;) Thank you, @guitargeek!

Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.94%. Comparing base (c37406d) to head (7f712db).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #973   +/-   ##
=======================================
  Coverage   93.94%   93.94%           
=======================================
  Files          55       55           
  Lines        7965     7965           
=======================================
  Hits         7483     7483           
  Misses        482      482           

@vgvassilev vgvassilev merged commit 036eb67 into vgvassilev:master Jul 8, 2024
87 checks passed
@guitargeek guitargeek deleted the shell_nix branch July 8, 2024 18:57
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