Skip to content

Commit d8400c9

Browse files
cerniccvaporif
andauthored
fix(solana): nix (#769)
Co-authored-by: Dmytro Onypko <vaporif@proton.me>
1 parent 3cfb694 commit d8400c9

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ broadcast/*/31337/
2828
.idea/
2929
*.iml
3030
*.code-workspace
31+
.vscode
3132
CLAUDE.md
3233

3334
# Rust

nix/agave.nix

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
, protobuf
1111
, perl
1212
, hidapi
13+
, udev
14+
, llvmPackages
1315
, rust-bin
1416
, writeShellScriptBin
1517
, anchor
@@ -48,19 +50,19 @@ let
4850
platformConfig = {
4951
x86_64-darwin = {
5052
archive = "platform-tools-osx-x86_64.tar.bz2";
51-
sha256 = "sha256-0qik6gpvcq2rav1qy43n5vjipfa3m756p452y0fikir4cl5fvd5w=";
53+
sha256 = "sha256-vLTtCmUkxxkd8KKQa8qpQ7kb5S52EI/DVllgtu8zM2I=";
5254
};
5355
aarch64-darwin = {
5456
archive = "platform-tools-osx-aarch64.tar.bz2";
5557
sha256 = "sha256-eZ5M/O444icVXIP7IpT5b5SoQ9QuAcA1n7cSjiIW0t0=";
5658
};
5759
x86_64-linux = {
5860
archive = "platform-tools-linux-x86_64.tar.bz2";
59-
sha256 = "sha256-vHeOPs7B7WptUJ/mVvyt7ue+MqfqAsbwAHM+xlN/tgQ=";
61+
sha256 = "sha256-qdMVf5N9X2+vQyGjWoA14PgnEUpmOwFQ20kuiT7CdZc=";
6062
};
6163
aarch64-linux = {
6264
archive = "platform-tools-linux-aarch64.tar.bz2";
63-
sha256 = "sha256-1wkh3vry4sc83ia8zfbv6yb6d7ygqsy88r1nj13y5fgp48i05imf=";
65+
sha256 = "sha256-rsYCIiL3ueJHkDZkhLzGz59mljd7uY9UHIhp4vMecPI=";
6466
};
6567
};
6668

@@ -167,12 +169,31 @@ let
167169
pkg-config
168170
protobuf
169171
perl
172+
llvmPackages.clang
170173
];
171174

172175
buildInputs = [
173176
openssl
174177
zlib
175-
] ++ optionals isLinux [ hidapi ];
178+
llvmPackages.libclang.lib
179+
] ++ optionals isLinux [
180+
hidapi
181+
udev
182+
];
183+
184+
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
185+
186+
BINDGEN_EXTRA_CLANG_ARGS = toString (
187+
[
188+
"-isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
189+
]
190+
++ optionals isLinux [
191+
"-isystem ${stdenv.cc.libc.dev}/include"
192+
]
193+
++ optionals hostPlatform.isDarwin [
194+
"-isystem ${stdenv.cc.libc}/include"
195+
]
196+
);
176197

177198
postPatch = ''
178199
substituteInPlace scripts/cargo-install-all.sh \

0 commit comments

Comments
 (0)