Skip to content

tools: add opensslVersion parameter to nix-shell#62465

Closed
panva wants to merge 1 commit intonodejs:mainfrom
panva:nix-openssl-options
Closed

tools: add opensslVersion parameter to nix-shell#62465
panva wants to merge 1 commit intonodejs:mainfrom
panva:nix-openssl-options

Conversation

@panva
Copy link
Copy Markdown
Member

@panva panva commented Mar 27, 2026

This adds a new opensslVersion parameter to shell.nix and tools/nix/sharedLibDeps.nix that allows selecting which OpenSSL version to link against.

# Default (OpenSSL 3.5.x, same as before)
nix-shell

# OpenSSL 1.1.x
nix-shell --arg opensslVersion '"1.1"'

# OpenSSL 3.0.x
nix-shell --arg opensslVersion '"3.0"'

# OpenSSL 3.5.x
nix-shell --arg opensslVersion '"3.5"'

# OpenSSL 3.6.x
nix-shell --arg opensslVersion '"3.6"'

# Bundled OpenSSL (from deps/openssl)
nix-shell --arg opensslVersion 'null'

@panva panva requested a review from aduh95 March 27, 2026 16:25
@nodejs-github-bot nodejs-github-bot added the tools Issues and PRs related to the tools directory. label Mar 27, 2026
@panva panva force-pushed the nix-openssl-options branch from 9cf5eac to 49e857d Compare March 27, 2026 16:31
@aduh95
Copy link
Copy Markdown
Contributor

aduh95 commented Mar 27, 2026

I don't think we should add that if we're not testing for it, it will be hard to maintain it. Instead, folks can already pick which version to link against with e.g. nix-shell --arg sharedLibDeps 'import ./tools/nix/sharedLibDeps.nix {} // { openssl = (import ./tools/nix/pkgs.nix {}).openssl_1_1; }' – it's not as convenient for users, but if that's hidden inside a .envrc that's not too bad I think.

@panva
Copy link
Copy Markdown
Member Author

panva commented Mar 27, 2026

that's good enough for me, alright.

@panva panva closed this Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants