From c54eb6492aba0a04b5075259e236d32095e1f687 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 27 Aug 2021 11:42:03 +0200 Subject: [PATCH 1/7] pythonPackages.chiavdf: 1.0.2 -> 1.0.3 --- pkgs/development/python-modules/chiavdf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/chiavdf/default.nix b/pkgs/development/python-modules/chiavdf/default.nix index 1b32a1d5f7cc..012a4055a01c 100644 --- a/pkgs/development/python-modules/chiavdf/default.nix +++ b/pkgs/development/python-modules/chiavdf/default.nix @@ -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 = [ From c8402f4a61031413c964f0b1a0f5059012d0e530 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 27 Aug 2021 11:44:25 +0200 Subject: [PATCH 2/7] pythonPackages.clvm-rs: 0.1.8 -> 0.1.10 --- pkgs/development/python-modules/clvm-rs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/clvm-rs/default.nix b/pkgs/development/python-modules/clvm-rs/default.nix index c18aab859fff..d1e103361423 100644 --- a/pkgs/development/python-modules/clvm-rs/default.nix +++ b/pkgs/development/python-modules/clvm-rs/default.nix @@ -9,20 +9,20 @@ buildPythonPackage rec { pname = "clvm_rs"; - version = "0.1.8"; + version = "0.1.10"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Chia-Network"; repo = "clvm_rs"; rev = version; - sha256 = "sha256-YQfcVF+/eEgSLhq0EIFjMlVUT/4w2S5C1/rbkNpKszo="; + sha256 = "sha256-ersQ5jz2dW9paWFqgkwmwLZkkqKxhT0lTRt78cRRoSc="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - sha256 = "000vkyqlbq35fg6k4c05qh52iw8m4xbzyh94y038zr9p0yjlr019"; + sha256 = "sha256-tJWTHTSg9HLd/7m7P3ZJw+QRgkIvt/SvtjFI0oKctxU="; }; format = "pyproject"; From a46e2c439059fbf074920dab43e7af7abccd6e21 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 27 Aug 2021 11:45:20 +0200 Subject: [PATCH 3/7] chia: 1.2.3 -> 1.2.5 --- pkgs/applications/blockchains/chia/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/blockchains/chia/default.nix b/pkgs/applications/blockchains/chia/default.nix index 7e44fc80dc3b..d98e4fb99bf4 100644 --- a/pkgs/applications/blockchains/chia/default.nix +++ b/pkgs/applications/blockchains/chia/default.nix @@ -7,14 +7,14 @@ python3Packages.buildPythonApplication rec { pname = "chia"; - version = "1.2.3"; + version = "1.2.5"; src = fetchFromGitHub { owner = "Chia-Network"; repo = "chia-blockchain"; rev = version; fetchSubmodules = true; - sha256 = "sha256-nK/Zk2zgIdrRtw3+VkUXQWfI9j29XFDOR95Dvbn07eA="; + sha256 = "sha256-3TRjOAlZfcvDKHecagA+hXRg7HqiD6NNegi956LEXS8="; }; 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 ]; @@ -64,6 +67,8 @@ python3Packages.buildPythonApplication rec { disabledTests = [ "test_spend_through_n" "test_spend_zero_coin" + "test_default_cached_master_passphrase" + "test_using_legacy_keyring" ]; postPatch = '' @@ -72,9 +77,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 ''; From 44f32b98c28728a786a1ae3d78344b210383d37f Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Sat, 28 Aug 2021 16:32:42 +0200 Subject: [PATCH 4/7] chia: don't run tests by default --- pkgs/applications/blockchains/chia/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/chia/default.nix b/pkgs/applications/blockchains/chia/default.nix index d98e4fb99bf4..622f523316f3 100644 --- a/pkgs/applications/blockchains/chia/default.nix +++ b/pkgs/applications/blockchains/chia/default.nix @@ -5,7 +5,7 @@ , python3Packages }: -python3Packages.buildPythonApplication rec { +let chia = python3Packages.buildPythonApplication rec { pname = "chia"; version = "1.2.5"; @@ -64,6 +64,10 @@ 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" @@ -86,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."; @@ -93,4 +101,5 @@ python3Packages.buildPythonApplication rec { maintainers = teams.chia.members; platforms = platforms.all; }; -} +}; +in chia From 11caa13c793e52d297aa3bfdc6512a4cad3dabd9 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 10 Sep 2021 15:07:34 +0200 Subject: [PATCH 5/7] pythonPackages.blspy: 1.0.5 -> 1.0.6 --- .../python-modules/blspy/default.nix | 11 +++- .../blspy/dont_fetch_dependencies.patch | 64 +++++++++++-------- 2 files changed, 47 insertions(+), 28 deletions(-) diff --git a/pkgs/development/python-modules/blspy/default.nix b/pkgs/development/python-modules/blspy/default.nix index 9592deccc6cc..1c5363ed7afe 100644 --- a/pkgs/development/python-modules/blspy/default.nix +++ b/pkgs/development/python-modules/blspy/default.nix @@ -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; + }; }) ]; diff --git a/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch b/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch index 416163a744b8..a480c6d37083 100644 --- a/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch +++ b/pkgs/development/python-modules/blspy/dont_fetch_dependencies.patch @@ -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) - From e884717edb912ca73f4a66eb1013d7e416bd3cbb Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 10 Sep 2021 15:14:56 +0200 Subject: [PATCH 6/7] pythonPackages.clvm-rs: 0.1.10 -> 0.1.11 --- pkgs/development/python-modules/clvm-rs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/clvm-rs/default.nix b/pkgs/development/python-modules/clvm-rs/default.nix index d1e103361423..a4dcf314fdbb 100644 --- a/pkgs/development/python-modules/clvm-rs/default.nix +++ b/pkgs/development/python-modules/clvm-rs/default.nix @@ -9,20 +9,20 @@ buildPythonPackage rec { pname = "clvm_rs"; - version = "0.1.10"; + version = "0.1.11"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "Chia-Network"; repo = "clvm_rs"; rev = version; - sha256 = "sha256-ersQ5jz2dW9paWFqgkwmwLZkkqKxhT0lTRt78cRRoSc="; + sha256 = "sha256-PXx7PKkqTb5slP8Z3z6yuWYrSEJSeGe75LmEvTFLKbQ="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - sha256 = "sha256-tJWTHTSg9HLd/7m7P3ZJw+QRgkIvt/SvtjFI0oKctxU="; + sha256 = "sha256-sztmQeNECR8KSWd+CwkWOip7DAr/pnacjaIvuakymcs="; }; format = "pyproject"; From 7159fac7402e4efb362e16b0e1032418e8a71718 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 10 Sep 2021 15:22:34 +0200 Subject: [PATCH 7/7] chia: 1.2.5 -> 1.2.6 --- pkgs/applications/blockchains/chia/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/chia/default.nix b/pkgs/applications/blockchains/chia/default.nix index 622f523316f3..4c596be9f4c8 100644 --- a/pkgs/applications/blockchains/chia/default.nix +++ b/pkgs/applications/blockchains/chia/default.nix @@ -7,14 +7,14 @@ let chia = python3Packages.buildPythonApplication rec { pname = "chia"; - version = "1.2.5"; + version = "1.2.6"; src = fetchFromGitHub { owner = "Chia-Network"; repo = "chia-blockchain"; rev = version; fetchSubmodules = true; - sha256 = "sha256-3TRjOAlZfcvDKHecagA+hXRg7HqiD6NNegi956LEXS8="; + sha256 = "sha256-Y+cRfx5WE+hb31E975xquuSmNgqr2AvaQnCE70sW91w="; }; patches = [