Skip to content

Commit 43ad6d9

Browse files
committed
fix(solana-tools): add missing Linux dependencies for auto-patchelf
The precompiled Solana binaries require several system libraries that were missing from buildInputs, causing auto-patchelf to fail on Linux: - systemd: provides libudev.so.1 (required by solana CLI tools) - ncurses: provides libncurses.so.6, libtinfo.so.6, libpanel.so.6 - libxml2: provides libxml2.so.2 - libedit: provides libedit.so.2 - xz: provides liblzma.so.5 Also add autoPatchelfIgnoreMissingDeps for optional libraries that aren't needed for normal usage: - SGX libraries (Intel secure enclave hardware) - OpenCL (GPU acceleration) - Python (lldb debugging)
1 parent 728cff6 commit 43ad6d9

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

packages/solana-tools.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ let
7878
libffi
7979
] ++ lib.optionals stdenv.isLinux [
8080
glibc
81+
systemd # provides libudev.so.1
82+
ncurses # provides libncurses.so.6, libtinfo.so.6, libpanel.so.6
83+
libxml2 # provides libxml2.so.2
84+
libedit # provides libedit.so.2
85+
xz # provides liblzma.so.5
8186
] ++ lib.optionals stdenv.isDarwin [
8287
darwin.apple_sdk.frameworks.Security
8388
darwin.apple_sdk.frameworks.SystemConfiguration
@@ -86,6 +91,17 @@ let
8691
# Disable stripping to avoid issues with text files and scripts
8792
dontStrip = true;
8893

94+
# Ignore optional dependencies that aren't needed for normal usage:
95+
# - SGX libraries (Intel secure enclave, only for specialized hardware)
96+
# - OpenCL (GPU acceleration, optional)
97+
# - Python (only needed for lldb debugging)
98+
autoPatchelfIgnoreMissingDeps = [
99+
"libsgx_uae_service.so"
100+
"libsgx_urts.so"
101+
"libOpenCL.so.1"
102+
"libpython3.10.so.1.0"
103+
];
104+
89105
unpackPhase = ''
90106
runHook preUnpack
91107

0 commit comments

Comments
 (0)