diff --git a/packages/default.nix b/packages/default.nix index 0d7c8b2..714943c 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -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; }; diff --git a/packages/spl-token-cli.nix b/packages/spl-token-cli.nix index 557bd19..c4dac81 100644 --- a/packages/spl-token-cli.nix +++ b/packages/spl-token-cli.nix @@ -5,6 +5,7 @@ , llvm , udev , pkg-config +, protobuf , openssl , zlib , libclang @@ -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; }