Skip to content

fix(nix): Make sure bssl is in the PATH; workaround nix build failure… #2431

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dougch
Copy link
Contributor

@dougch dougch commented May 21, 2025

Issues:

none

Description of changes:

In some CI environments (in docker containers), the build is trying to write to $HOME, which nix intentionally unsets. This causes build failures with this error:

FAILED: crypto/err_data.c /tmp/nix-build-aws-lc.drv-0/source/build/crypto/err_data.c
cd /tmp/nix-build-aws-lc.drv-0/source/crypto/err && /nix/store/2xc5jh4nxvm68c67ila9p2rj3qrjgz0x-go-1.23.5/bin/go run err_data_generate.go > /tmp/nix-build-aws->
failed to initialize build cache at /homeless-shelter/.cache/go-build: mkdir /homeless-shelter: permission denied

By setting $HOME in preBuild, we can eliminate this failure.

Also, the bssl utility is not available in a devShell, because we're not properly importing aws-lc.

Call-outs:

The build failure is blocking s2n-tls from using the upstream flake.

Reformatting both nix files with nix fmt.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? locally.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.88%. Comparing base (4e97131) to head (547db09).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2431      +/-   ##
==========================================
- Coverage   78.89%   78.88%   -0.01%     
==========================================
  Files         621      621              
  Lines      108613   108613              
  Branches    15414    15414              
==========================================
- Hits        85685    85681       -4     
- Misses      22258    22263       +5     
+ Partials      670      669       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dougch dougch marked this pull request as ready for review May 21, 2025 16:46
@dougch dougch requested a review from a team as a code owner May 21, 2025 16:46
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.

3 participants