2020-09-26 00:41:01 +01:00
|
|
|
{ clang
|
2018-12-05 14:10:31 +00:00
|
|
|
, fetchFromGitHub
|
2020-09-26 00:41:01 +01:00
|
|
|
, lib
|
|
|
|
, llvmPackages
|
|
|
|
, protobuf
|
2018-12-05 14:10:31 +00:00
|
|
|
, rustPlatform
|
|
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "polkadot";
|
2020-10-20 17:28:34 +01:00
|
|
|
version = "0.8.25";
|
2018-12-05 14:10:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paritytech";
|
2020-09-26 00:41:01 +01:00
|
|
|
repo = "polkadot";
|
|
|
|
rev = "v${version}";
|
2020-10-20 17:28:34 +01:00
|
|
|
sha256 = "1jdklmysr25rlwgx7pz0jw66j1w60h98kqghzjhr90zhynzh39lz";
|
2020-03-09 04:02:24 +00:00
|
|
|
};
|
2020-02-14 02:00:26 +00:00
|
|
|
|
2020-10-20 17:28:34 +01:00
|
|
|
cargoSha256 = "08yfafrspkd1g1mhlfwngbknkxjkyymbcga8n2rdsk7mz0hm0vgy";
|
2020-09-26 00:41:01 +01:00
|
|
|
|
|
|
|
cargoPatches = [ ./substrate-wasm-builder-runner.patch ];
|
|
|
|
|
|
|
|
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
|
|
|
|
# complicated rust environment setup. The resulting binary is still useful for
|
|
|
|
# live networks since those just use the WASM blob from the network chainspec.
|
|
|
|
BUILD_DUMMY_WASM_BINARY = 1;
|
2018-12-05 14:10:31 +00:00
|
|
|
|
2020-09-26 00:41:01 +01:00
|
|
|
# We can't run the test suite since we didn't compile the WASM runtimes.
|
|
|
|
doCheck = false;
|
2018-12-05 14:10:31 +00:00
|
|
|
|
2020-09-26 00:41:01 +01:00
|
|
|
meta = with lib; {
|
2018-12-05 14:10:31 +00:00
|
|
|
description = "Polkadot Node Implementation";
|
2020-03-09 04:02:24 +00:00
|
|
|
homepage = "https://polkadot.network";
|
2018-12-05 14:10:31 +00:00
|
|
|
license = licenses.gpl3;
|
2020-09-26 00:41:01 +01:00
|
|
|
maintainers = with maintainers; [ akru andresilva ];
|
2018-12-05 14:10:31 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|