From 11caa13c793e52d297aa3bfdc6512a4cad3dabd9 Mon Sep 17 00:00:00 2001 From: Louis Bettens Date: Fri, 10 Sep 2021 15:07:34 +0200 Subject: [PATCH] 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) -