Skip to content

Commit

Permalink
fix spl-token-cli build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Apr 22, 2024
1 parent a58aeef commit 1d231ea
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ in
anchorPackages // solanaFlattened // rec {
spl-token-cli = pkgs.callPackage ./spl-token-cli.nix {
inherit (rustStable) rustPlatform;
inherit (pkgs) lib clang llvm pkg-config openssl zlib udev stdenv fetchCrate;
inherit (pkgs.llvmPackages) libclang;
inherit darwinPackages;
};
Expand Down
19 changes: 15 additions & 4 deletions packages/spl-token-cli.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, llvm
, udev
, pkg-config
, protobuf
, openssl
, zlib
, libclang
Expand All @@ -24,9 +25,19 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-GILGgcf2xo2cxKAP2gDakBwmNlhPgz/AcmbdighluSU=";
verifyCargoDeps = true;

LIBCLANG_PATH = "${libclang}/lib";
nativeBuildInputs = [ clang llvm pkg-config ];
buildInputs = [ libclang openssl zlib ] ++ darwinPackages
++ (lib.optionals stdenv.isLinux [ udev ]);
nativeBuildInputs = [ clang llvm pkg-config protobuf ];
buildInputs = [
rustPlatform.bindgenHook
libclang
openssl
zlib
] ++ darwinPackages
++ (lib.optionals stdenv.isLinux [ udev ]);
strictDeps = true;

# Tests build bpf stuff, which we don't need
doCheck = false;

# If set, always finds OpenSSL in the system, even if the vendored feature is enabled.
OPENSSL_NO_VENDOR = 1;
}

0 comments on commit 1d231ea

Please sign in to comment.