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)
This commit is contained in:
parent
5959f625b5
commit
5033c7b2f6
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue