Merge pull request #135892 from lourkeur/update/chia

chia: 1.2.3 -> 1.2.6
This commit is contained in:
Sandro 2021-09-10 19:22:06 +02:00 committed by GitHub
commit f723b0fe5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 70 additions and 39 deletions

View File

@ -5,16 +5,16 @@
, python3Packages
}:
python3Packages.buildPythonApplication rec {
let chia = python3Packages.buildPythonApplication rec {
pname = "chia";
version = "1.2.3";
version = "1.2.6";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "chia-blockchain";
rev = version;
fetchSubmodules = true;
sha256 = "sha256-nK/Zk2zgIdrRtw3+VkUXQWfI9j29XFDOR95Dvbn07eA=";
sha256 = "sha256-Y+cRfx5WE+hb31E975xquuSmNgqr2AvaQnCE70sW91w=";
};
patches = [
@ -45,15 +45,18 @@ python3Packages.buildPythonApplication rec {
clvm
clvm-rs
clvm-tools
colorama
colorlog
concurrent-log-handler
cryptography
dnspython
fasteners
keyrings-cryptfile
pyyaml
setproctitle
setuptools # needs pkg_resources at runtime
sortedcontainers
watchdog
websockets
];
@ -61,9 +64,15 @@ python3Packages.buildPythonApplication rec {
pytestCheckHook
];
# Testsuite is expensive and non-deterministic, so it is available in
# passthru.tests instead.
doCheck = false;
disabledTests = [
"test_spend_through_n"
"test_spend_zero_coin"
"test_default_cached_master_passphrase"
"test_using_legacy_keyring"
];
postPatch = ''
@ -72,9 +81,7 @@ python3Packages.buildPythonApplication rec {
--replace "aiohttp==3.7.4" "aiohttp>=3.7.4" \
--replace "sortedcontainers==2.3.0" "sortedcontainers>=2.3.0" \
--replace "click==7.1.2" "click>=7.1.2" \
--replace "clvm_rs==0.1.8" "clvm_rs>=0.1.8" \
--replace "clvm==0.9.7" "clvm>=0.9.7" \
--replace "bitstring==3.1.7" "bitstring>=3.1.9" \
ln -sf ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
'';
@ -83,6 +90,10 @@ python3Packages.buildPythonApplication rec {
export HOME=`mktemp -d`
'';
passthru.tests = {
chiaWithTests = chia.overrideAttrs (_: { doCheck = true; });
};
meta = with lib; {
homepage = "https://www.chia.net/";
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
@ -90,4 +101,5 @@ python3Packages.buildPythonApplication rec {
maintainers = teams.chia.members;
platforms = platforms.all;
};
}
};
in chia

View File

@ -13,12 +13,12 @@
buildPythonPackage rec {
pname = "blspy";
version = "1.0.5";
version = "1.0.6";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-uDXzAdGzfyRbsMVllLNd3DK8F/GfovdX293z5Mel6eg=";
hash = "sha256-sULXnecEs8VI687pR9EK9jjYWlrB4tV4dt7Kzekaxb4=";
};
patches = [
@ -32,6 +32,13 @@ buildPythonPackage rec {
rev = "1885ae3b681c423c72b65ce1fe70910142cf941c"; # pinned by blspy
hash = "sha256-tsSZTcssl8t7Nqdex4BesgQ+ACPgTdtHnJFvS9josN0=";
};
sodium_src = fetchFromGitHub {
owner = "AmineKhaldi";
repo = "libsodium-cmake";
rev = "f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65"; # pinned by blspy
sha256 = "sha256-lGz7o6DQVAuEc7yTp8bYS2kwjzHwGaNjugDi1ruRJOA=";
fetchSubmodules = true;
};
})
];

View File

@ -1,8 +1,44 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6922167..23d8da6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,29 +31,18 @@ set(CMAKE_MODULE_PATH
include(FetchContent)
FetchContent_Declare(Sodium
- GIT_REPOSITORY https://github.com/AmineKhaldi/libsodium-cmake.git
- # Latest commit at the moment this was added here
- # Anchored to libsodium v1.0.18
- GIT_TAG f73a3fe1afdc4e37ac5fe0ddd401bf521f6bba65
+ URL @sodium_src@
)
set(SODIUM_PCH "on" CACHE STRING "")
set(SODIUM_DISABLE_TESTS "on" CACHE STRING "")
set(SODIUM_CHIA_MINIMAL "on" CACHE STRING "")
FetchContent_MakeAvailable(Sodium)
-if (DEFINED ENV{RELIC_MAIN})
- set(RELIC_GIT_TAG "origin/main")
-else ()
- # This is currently anchored to upstream aecdcae7956f542fbee2392c1f0feb0a8ac41dc5
- set(RELIC_GIT_TAG "1d98e5abf3ca5b14fd729bd5bcced88ea70ecfd7")
-endif ()
-
message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")
FetchContent_Declare(
relic
- GIT_REPOSITORY https://github.com/Chia-Network/relic.git
- GIT_TAG ${RELIC_GIT_TAG}
+ SOURCE_DIR @relic_src@
)
# Relic related options
diff --git a/python-bindings/CMakeLists.txt b/python-bindings/CMakeLists.txt
index 255e3bb..5f99c3a 100644
index 5a8c381..d9aa940 100644
--- a/python-bindings/CMakeLists.txt
+++ b/python-bindings/CMakeLists.txt
@@ -6,8 +6,7 @@ include(FetchContent)
@@ -1,8 +1,7 @@
FetchContent_Declare(
pybind11
@ -12,27 +48,3 @@ index 255e3bb..5f99c3a 100644
)
FetchContent_MakeAvailable(pybind11 relic)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index faecc61..3272116 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,18 +4,9 @@ set (CMAKE_CXX_STANDARD 17)
# CMake 3.14+
include(FetchContent)
-if (DEFINED ENV{RELIC_MAIN})
- set(RELIC_GIT_TAG "origin/main")
-else ()
- set(RELIC_GIT_TAG "b7b2266a0e4ee6f628f61d3ab638f524a18b52f1")
-endif ()
-
-message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}")
-
FetchContent_Declare(
relic
- GIT_REPOSITORY https://github.com/relic-toolkit/relic.git
- GIT_TAG ${RELIC_GIT_TAG}
+ SOURCE_DIR @relic_src@
)
FetchContent_MakeAvailable(relic)

View File

@ -14,12 +14,12 @@
buildPythonPackage rec {
pname = "chiavdf";
version = "1.0.2";
version = "1.0.3";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-YSG4Aj9gd72NOgDSYU0kPn/nZz9Pza9FE9WoG/H4PWw=";
hash = "sha256-XbmK7ZJnUy3Zg9XWt0t/Qb2k5qIlu4vIbxdDFYFjFPI=";
};
patches = [

View File

@ -9,20 +9,20 @@
buildPythonPackage rec {
pname = "clvm_rs";
version = "0.1.8";
version = "0.1.11";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Chia-Network";
repo = "clvm_rs";
rev = version;
sha256 = "sha256-YQfcVF+/eEgSLhq0EIFjMlVUT/4w2S5C1/rbkNpKszo=";
sha256 = "sha256-PXx7PKkqTb5slP8Z3z6yuWYrSEJSeGe75LmEvTFLKbQ=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "000vkyqlbq35fg6k4c05qh52iw8m4xbzyh94y038zr9p0yjlr019";
sha256 = "sha256-sztmQeNECR8KSWd+CwkWOip7DAr/pnacjaIvuakymcs=";
};
format = "pyproject";