2020-09-26 01:41:01 +02:00
|
|
|
{ clang
|
2018-12-05 15:10:31 +01:00
|
|
|
, fetchFromGitHub
|
2020-09-26 01:41:01 +02:00
|
|
|
, lib
|
|
|
|
, llvmPackages
|
|
|
|
, protobuf
|
2018-12-05 15:10:31 +01:00
|
|
|
, rustPlatform
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 13:41:23 +02:00
|
|
|
pname = "polkadot";
|
2021-01-22 18:16:14 +01:00
|
|
|
version = "0.8.27";
|
2018-12-05 15:10:31 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paritytech";
|
2020-09-26 01:41:01 +02:00
|
|
|
repo = "polkadot";
|
|
|
|
rev = "v${version}";
|
2021-01-22 18:16:14 +01:00
|
|
|
sha256 = "1zkqmsclhnv14s4mxz7h49kfx8wyi3lyi0dik6jn1fh6w8zr962c";
|
2020-03-09 05:02:24 +01:00
|
|
|
};
|
2020-02-14 03:00:26 +01:00
|
|
|
|
2021-01-22 18:16:14 +01:00
|
|
|
cargoSha256 = "1j0pr09y5pc43a4rz1zq3h9vmd874zz6z0wd279lpm6p2m0077cs";
|
2020-09-26 01:41:01 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ clang ];
|
|
|
|
|
|
|
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
|
|
|
PROTOC = "${protobuf}/bin/protoc";
|
|
|
|
|
|
|
|
# NOTE: We don't build the WASM runtimes since this would require a more
|
2021-01-22 18:16:14 +01: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;
|
2018-12-05 15:10:31 +01:00
|
|
|
|
2020-09-26 01:41:01 +02:00
|
|
|
# We can't run the test suite since we didn't compile the WASM runtimes.
|
|
|
|
doCheck = false;
|
2018-12-05 15:10:31 +01:00
|
|
|
|
2020-09-26 01:41:01 +02:00
|
|
|
meta = with lib; {
|
2018-12-05 15:10:31 +01:00
|
|
|
description = "Polkadot Node Implementation";
|
2020-03-09 05:02:24 +01:00
|
|
|
homepage = "https://polkadot.network";
|
2018-12-05 15:10:31 +01:00
|
|
|
license = licenses.gpl3;
|
2020-10-20 18:29:14 +02:00
|
|
|
maintainers = with maintainers; [ akru andresilva RaghavSood ];
|
2018-12-05 15:10:31 +01:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|