2020-10-20 17:27:49 +00:00
|
|
|
{ clang
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2020-10-20 17:27:49 +00:00
|
|
|
, lib
|
|
|
|
, llvmPackages
|
|
|
|
, protobuf
|
2020-04-24 23:36:52 +00:00
|
|
|
, rustPlatform
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "polkadot";
|
2021-10-08 15:17:17 +00:00
|
|
|
version = "0.9.11";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paritytech";
|
2020-10-20 17:27:49 +00:00
|
|
|
repo = "polkadot";
|
|
|
|
rev = "v${version}";
|
2021-10-08 15:17:17 +00:00
|
|
|
sha256 = "17a0g4sijc1p9fy5xh8krs3y1hc75s17ak0hfhpi231gs4fl20pd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-10-08 15:17:17 +00:00
|
|
|
cargoSha256 = "07yzdchpzs2g1f8fzhaj11yybd2d8lv9ib859z7122anxzdr0028";
|
2020-10-20 17:27:49 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ clang ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
2020-10-20 17:27:49 +00:00
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
|
|
|
|
# NOTE: We don't build the WASM runtimes since this would require a more
|
2021-02-05 17:12:51 +00:00
|
|
|
# complicated rust environment setup and this is only needed for developer
|
|
|
|
# environments. The resulting binary is useful for end-users of live networks
|
|
|
|
# since those just use the WASM blob from the network chainspec.
|
|
|
|
SKIP_WASM_BUILD = 1;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-20 17:27:49 +00:00
|
|
|
# We can't run the test suite since we didn't compile the WASM runtimes.
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-20 17:27:49 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Polkadot Node Implementation";
|
|
|
|
homepage = "https://polkadot.network";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ akru andresilva asymmetric FlorianFranzen RaghavSood ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|