From 5033c7b2f6e54fdeec9ad04925e5659e443a8150 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Fri, 6 Feb 2026 19:23:02 +0000 Subject: [PATCH] fix(nix): resolve missing libssl.so.3 when running via nix run - Add autoPatchelfHook to patch RPATH in the output binary so it can find libssl and libcrypto at runtime - Add stdenv.cc.cc.lib to buildInputs to satisfy libgcc_s.so.1 dependency during auto-patchelf - Move LD_LIBRARY_PATH from devShell to the package so test binaries can find libssl during checkPhase (before patchelf runs) --- flake.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 028a006..bf26248 100644 --- a/flake.nix +++ b/flake.nix @@ -51,6 +51,7 @@ cargoLock.lockFile = ./Cargo.lock; nativeBuildInputs = with pkgs; [ + autoPatchelfHook clang lld pkg-config @@ -59,6 +60,7 @@ buildInputs = with pkgs; [ openssl + stdenv.cc.cc.lib ]; env.LD_LIBRARY_PATH = lib.makeLibraryPath [ pkgs.openssl ]; @@ -106,7 +108,6 @@ NIX_CONFIG = "experimental-features = nix-command flakes"; RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library"; - LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ openssl ]; buildInputs = [ rust