diff options
Diffstat (limited to 'pkgs/applications/blockchains/polkadot/default.nix')
-rw-r--r-- | pkgs/applications/blockchains/polkadot/default.nix | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/applications/blockchains/polkadot/default.nix b/pkgs/applications/blockchains/polkadot/default.nix index fe54ddacc3113..f247b05eb93ab 100644 --- a/pkgs/applications/blockchains/polkadot/default.nix +++ b/pkgs/applications/blockchains/polkadot/default.nix @@ -1,5 +1,7 @@ { fetchFromGitHub , lib +, openssl +, pkg-config , protobuf , rocksdb_8_3 , rust-jemalloc-sys-unprefixed @@ -15,13 +17,13 @@ let in rustPlatform.buildRustPackage rec { pname = "polkadot"; - version = "1.10.0"; + version = "1.12.0"; src = fetchFromGitHub { owner = "paritytech"; repo = "polkadot-sdk"; rev = "polkadot-v${version}"; - hash = "sha256-xRuV/1+OZeoth/lb5OXwVzHl2IWK1G0GgIN0E8EZlYg="; + hash = "sha256-/m7Tg+9JHbnwKwWPY8gWIJkIHktGFlqcrbLLgNWjfwU="; # the build process of polkadot requires a .git folder in order to determine # the git commit hash that is being built and add it to the version string. @@ -46,8 +48,10 @@ rustPlatform.buildRustPackage rec { lockFile = ./Cargo.lock; outputHashes = { "ark-secret-scalar-0.0.2" = "sha256-91sODxaj0psMw0WqigMCGO5a7+NenAsRj5ZmW6C7lvc="; + "ckb-merkle-mountain-range-0.6.0" = "sha256-oTe1l406lTpgOefPai664JYwzezLjkIDXpiZTfjbd28="; "common-0.1.0" = "sha256-LHz2dK1p8GwyMimlR7AxHLz1tjTYolPwdjP7pxork1o="; "fflonk-0.1.0" = "sha256-+BvZ03AhYNP0D8Wq9EMsP+lSgPA6BBlnWkoxTffVLwo="; + "litep2p-0.3.0" = "sha256-y0my2vi0+2CWNOtCh/vtsUbIcU1iNSFAJbLiCktEcOc="; "sp-ark-bls12-381-0.4.2" = "sha256-nNr0amKhSvvI9BlsoP+8v6Xppx/s7zkf0l9Lm3DW8w8="; "sp-crypto-ec-utils-0.4.1" = "sha256-/Sw1ZM/JcJBokFE4y2mv/P43ciTL5DEm0PDG0jZvMkI="; }; @@ -63,21 +67,22 @@ rustPlatform.buildRustPackage rec { doCheck = false; nativeBuildInputs = [ + pkg-config rustPlatform.bindgenHook rustc rustc.llvmPackages.lld ]; # NOTE: jemalloc is used by default on Linux with unprefixed enabled - buildInputs = lib.optionals stdenv.isLinux [ rust-jemalloc-sys-unprefixed ] ++ + buildInputs = [ openssl ] ++ + lib.optionals stdenv.isLinux [ rust-jemalloc-sys-unprefixed ] ++ lib.optionals stdenv.isDarwin [ Security SystemConfiguration ]; # NOTE: disable building `core`/`std` in wasm environment since rust-src isn't # available for `rustc-wasm32` WASM_BUILD_STD = 0; - # NOTE: we need to force lld otherwise rust-lld is not found for wasm32 target - CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld"; + OPENSSL_NO_VENDOR = 1; PROTOC = "${protobuf}/bin/protoc"; ROCKSDB_LIB_DIR = "${rocksdb}/lib"; @@ -86,6 +91,10 @@ rustPlatform.buildRustPackage rec { homepage = "https://polkadot.network"; license = licenses.gpl3Only; maintainers = with maintainers; [ akru andresilva FlorianFranzen RaghavSood ]; - platforms = platforms.unix; + # See Iso::from_arch in src/isa/mod.rs in cranelift-codegen-meta. + platforms = intersectLists platforms.unix (platforms.aarch64 ++ platforms.s390x ++ platforms.riscv64 ++ platforms.x86); + # See comment about wasm32-unknown-unknown in rustc.nix. + broken = lib.any (a: lib.hasAttr a stdenv.hostPlatform.gcc) [ "cpu" "float-abi" "fpu" ] || + !stdenv.hostPlatform.gcc.thumb or true; }; } |