diff options
Diffstat (limited to 'pkgs/applications/blockchains')
7 files changed, 10 insertions, 24 deletions
diff --git a/pkgs/applications/blockchains/electrs/default.nix b/pkgs/applications/blockchains/electrs/default.nix index 35470a7b8542c..0bc5c7baa4161 100644 --- a/pkgs/applications/blockchains/electrs/default.nix +++ b/pkgs/applications/blockchains/electrs/default.nix @@ -24,8 +24,7 @@ rustPlatform.buildRustPackage rec { cargoHash = "sha256-p4t+G13XaCl7+IbX5YyBFF0PmARbw4XlRvnA0PRcjvQ="; # needed for librocksdb-sys - nativeBuildInputs = [ llvmPackages.clang ]; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; + nativeBuildInputs = [ rustPlatform.bindgenHook ]; # link rocksdb dynamically ROCKSDB_INCLUDE_DIR = "${rocksdb}/include"; diff --git a/pkgs/applications/blockchains/lighthouse/default.nix b/pkgs/applications/blockchains/lighthouse/default.nix index c778ce3f75755..3eebd80cb5934 100644 --- a/pkgs/applications/blockchains/lighthouse/default.nix +++ b/pkgs/applications/blockchains/lighthouse/default.nix @@ -34,14 +34,12 @@ rustPlatform.buildRustPackage rec { buildFeatures = [ "modern" "gnosis" ]; - nativeBuildInputs = [ clang cmake perl protobuf ]; + nativeBuildInputs = [ rustPlatform.bindgenHook cmake perl protobuf ]; buildInputs = lib.optionals stdenv.isDarwin [ Security ]; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - depositContractSpec = fetchurl { url = "https://raw.githubusercontent.com/ethereum/eth2.0-specs/v${depositContractSpecVersion}/deposit_contract/contracts/validator_registration.json"; hash = "sha256-ZslAe1wkmkg8Tua/AmmEfBmjqMVcGIiYHwi+WssEwa8="; diff --git a/pkgs/applications/blockchains/nearcore/default.nix b/pkgs/applications/blockchains/nearcore/default.nix index 44bfcc3a6e00f..a929406cee929 100644 --- a/pkgs/applications/blockchains/nearcore/default.nix +++ b/pkgs/applications/blockchains/nearcore/default.nix @@ -42,14 +42,12 @@ rustPlatform.buildRustPackage rec { nativeBuildInputs = [ pkg-config protobuf + rustPlatform.bindgenHook ]; # fat LTO requires ~3.4GB RAM requiredSystemFeatures = [ "big-parallel" ]; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - BINDGEN_EXTRA_CLANG_ARGS = "-isystem ${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"; - meta = with lib; { description = "Reference client for NEAR Protocol"; homepage = "https://github.com/near/nearcore"; diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index 443fe36143c50..596130337c7ad 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -36,14 +36,13 @@ rustPlatform.buildRustPackage rec { buildInputs = lib.optionals stdenv.isDarwin [ Security ]; - nativeBuildInputs = [ clang ]; + nativeBuildInputs = [ rustPlatform.bindgenHook ]; preBuild = '' export SUBSTRATE_CLI_GIT_COMMIT_HASH=$(cat .git_commit) rm .git_commit ''; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; PROTOC = "${protobuf}/bin/protoc"; # NOTE: We don't build the WASM runtimes since this would require a more diff --git a/pkgs/applications/blockchains/snarkos/default.nix b/pkgs/applications/blockchains/snarkos/default.nix index 82c3555f64d6a..fe8b24b6ca227 100644 --- a/pkgs/applications/blockchains/snarkos/default.nix +++ b/pkgs/applications/blockchains/snarkos/default.nix @@ -23,15 +23,13 @@ rustPlatform.buildRustPackage rec { # buildAndTestSubdir = "cli"; - nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config llvmPackages.clang ]; + nativeBuildInputs = lib.optionals stdenv.isLinux [ pkg-config rustPlatform.bindgenHook ]; # Needed to get openssl-sys to use pkg-config. OPENSSL_NO_VENDOR = 1; OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib"; OPENSSL_DIR="${lib.getDev openssl}"; - LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"; - # TODO check why rust compilation fails by including the rocksdb from nixpkgs # Used by build.rs in the rocksdb-sys crate. If we don't set these, it would # try to build RocksDB from source. diff --git a/pkgs/applications/blockchains/solana-validator/default.nix b/pkgs/applications/blockchains/solana-validator/default.nix index 503d4b404e728..bb35f7be38892 100644 --- a/pkgs/applications/blockchains/solana-validator/default.nix +++ b/pkgs/applications/blockchains/solana-validator/default.nix @@ -68,12 +68,9 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = builtins.map (n: "--bin=${n}") solanaPkgs; # weird errors. see https://github.com/NixOS/nixpkgs/issues/52447#issuecomment-852079285 - LIBCLANG_PATH = "${libclang.lib}/lib"; - BINDGEN_EXTRA_CLANG_ARGS = - "-isystem ${libclang.lib}/lib/clang/${lib.getVersion clang}/include"; - LLVM_CONFIG_PATH = "${llvm}/bin/llvm-config"; + # LLVM_CONFIG_PATH = "${llvm}/bin/llvm-config"; - nativeBuildInputs = [ clang llvm pkg-config protobuf rustfmt perl ]; + nativeBuildInputs = [ pkg-config protobuf rustfmt perl rustPlatform.bindgenHook ]; buildInputs = [ openssl zlib libclang hidapi ] ++ (lib.optionals stdenv.isLinux [ udev ]); strictDeps = true; diff --git a/pkgs/applications/blockchains/teos/default.nix b/pkgs/applications/blockchains/teos/default.nix index 197246770d0dc..b1fb1a77c1d48 100644 --- a/pkgs/applications/blockchains/teos/default.nix +++ b/pkgs/applications/blockchains/teos/default.nix @@ -38,11 +38,8 @@ let perl # used by openssl-sys to configure protobuf rustfmt - llvmPackages.clang + rustPlatform.bindgenHook ]; - - - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; in { teos = rustPlatform.buildRustPackage { @@ -50,7 +47,7 @@ in cargoSha256 = "sha256-7VYYYSMJ2JP1KuA8sD0X3wInubH/jbA/sgzsTsomyEc="; buildAndTestSubdir = "teos"; - inherit version src cargoPatches buildInputs nativeBuildInputs LIBCLANG_PATH; + inherit version src cargoPatches buildInputs nativeBuildInputs; meta = common.meta // { description = "A Lightning watchtower compliant with BOLT13, written in Rust"; @@ -66,7 +63,7 @@ in cargoSha256 = "sha256-xL+DiEfgBYJQ1UJm7LAr1/f34pkU8FRl4Seic8MFAlM="; buildAndTestSubdir = "watchtower-plugin"; - inherit version src cargoPatches buildInputs nativeBuildInputs LIBCLANG_PATH; + inherit version src cargoPatches buildInputs nativeBuildInputs; meta = common.meta // { description = "A Lightning watchtower plugin for clightning"; |