Merge pull request #132215 from ilyakooo0/iko/chia-plotter

authored by

Sandro and committed by
GitHub
cd9938d1 d0e0c93c

+123
+6
maintainers/maintainer-list.nix
··· 4541 4541 githubId = 592849; 4542 4542 name = "Ilya Kolpakov"; 4543 4543 }; 4544 + ilyakooo0 = { 4545 + name = "Ilya Kostyuchenko"; 4546 + email = "ilyakooo0@gmail.com"; 4547 + github = "ilyakooo0"; 4548 + githubId = 6209627; 4549 + }; 4544 4550 imalison = { 4545 4551 email = "IvanMalison@gmail.com"; 4546 4552 github = "IvanMalison";
+65
pkgs/applications/blockchains/chia-plotter/default.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , stdenv 4 + , libsodium 5 + , cmake 6 + , substituteAll 7 + , pythonPackages 8 + }: 9 + 10 + stdenv.mkDerivation { 11 + pname = "chia-plotter"; 12 + version = "unstable-2021-07-12"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "madMAx43v3r"; 16 + repo = "chia-plotter"; 17 + rev = "974d6e5f1440f68c48492122ca33828a98864dfc"; 18 + sha256 = "0dliswvqmi3wq9w8jp0sb0z74n5k37608sig6r60z206g2bwhjja"; 19 + fetchSubmodules = true; 20 + }; 21 + 22 + patches = [ 23 + # prevent CMake from trying to get libraries on the Internet 24 + (substituteAll { 25 + src = ./dont_fetch_dependencies.patch; 26 + pybind11_src = pythonPackages.pybind11.src; 27 + relic_src = fetchFromGitHub { 28 + owner = "relic-toolkit"; 29 + repo = "relic"; 30 + rev = "1885ae3b681c423c72b65ce1fe70910142cf941c"; 31 + hash = "sha256-tsSZTcssl8t7Nqdex4BesgQ+ACPgTdtHnJFvS9josN0="; 32 + }; 33 + }) 34 + ]; 35 + 36 + nativeBuildInputs = [ cmake ]; 37 + 38 + buildInputs = [ libsodium ]; 39 + 40 + # These flags come from the upstream build script: 41 + # https://github.com/madMAx43v3r/chia-plotter/blob/974d6e5f1440f68c48492122ca33828a98864dfc/make_devel.sh#L7 42 + CXXFLAGS = "-O3 -fmax-errors=1"; 43 + cmakeFlags = [ 44 + "-DARITH=easy" 45 + "-DBUILD_BLS_PYTHON_BINDINGS=false" 46 + "-DBUILD_BLS_TESTS=false" 47 + "-DBUILD_BLS_BENCHMARKS=false" 48 + ]; 49 + 50 + installPhase = '' 51 + runHook preInstall 52 + 53 + install -D -m 755 chia_plot $out/bin/chia_plot 54 + 55 + runHook postInstall 56 + ''; 57 + 58 + meta = with lib; { 59 + homepage = "https://github.com/madMAx43v3r/chia-plotter"; 60 + description = "New implementation of a chia plotter which is designed as a processing pipeline"; 61 + license = licenses.gpl3Only; 62 + platforms = platforms.linux; 63 + maintainers = with maintainers; [ ilyakooo0 ]; 64 + }; 65 + }
+50
pkgs/applications/blockchains/chia-plotter/dont_fetch_dependencies.patch
··· 1 + diff --git a/lib/bls-signatures/python-bindings/CMakeLists.txt b/lib/bls-signatures/python-bindings/CMakeLists.txt 2 + index 255e3bb..5f99c3a 100644 3 + --- a/lib/bls-signatures/python-bindings/CMakeLists.txt 4 + +++ b/lib/bls-signatures/python-bindings/CMakeLists.txt 5 + @@ -6,8 +6,7 @@ include(FetchContent) 6 + 7 + FetchContent_Declare( 8 + pybind11 9 + - GIT_REPOSITORY https://github.com/pybind/pybind11.git 10 + - GIT_TAG v2.6.2 11 + + SOURCE_DIR @pybind11_src@ 12 + ) 13 + FetchContent_MakeAvailable(pybind11 relic) 14 + 15 + diff --git a/lib/bls-signatures/src/CMakeLists.txt b/lib/bls-signatures/src/CMakeLists.txt 16 + index b762b5d..e06073b 100644 17 + --- a/lib/bls-signatures/src/CMakeLists.txt 18 + +++ b/lib/bls-signatures/src/CMakeLists.txt 19 + @@ -4,18 +4,11 @@ set (CMAKE_CXX_STANDARD 17) 20 + # CMake 3.14+ 21 + include(FetchContent) 22 + 23 + -if (DEFINED ENV{RELIC_MAIN}) 24 + - set(RELIC_GIT_TAG "origin/main") 25 + -else () 26 + - set(RELIC_GIT_TAG "1885ae3b681c423c72b65ce1fe70910142cf941c") 27 + -endif () 28 + - 29 + message(STATUS "Relic will be built from: ${RELIC_GIT_TAG}") 30 + 31 + FetchContent_Declare( 32 + relic 33 + - GIT_REPOSITORY https://github.com/relic-toolkit/relic.git 34 + - GIT_TAG ${RELIC_GIT_TAG} 35 + + SOURCE_DIR @relic_src@ 36 + ) 37 + FetchContent_MakeAvailable(relic) 38 + 39 + diff --git a/CMakeLists.txt b/CMakeLists.txt 40 + index 970ec74..948441a 100644 41 + --- a/CMakeLists.txt 42 + +++ b/CMakeLists.txt 43 + @@ -38,6 +38,7 @@ include_directories( 44 + ${BLAKE3_PATH} 45 + ${CMAKE_BINARY_DIR}/_deps/relic-src/include 46 + ${CMAKE_BINARY_DIR}/_deps/relic-build/include 47 + + @relic_src@/include 48 + ) 49 + 50 + IF (WIN32)
+2
pkgs/top-level/all-packages.nix
··· 28649 28649 28650 28650 chia = callPackage ../applications/blockchains/chia { }; 28651 28651 28652 + chia-plotter = callPackage ../applications/blockchains/chia-plotter { }; 28653 + 28652 28654 clightning = callPackage ../applications/blockchains/clightning { }; 28653 28655 28654 28656 bitcoin-abc = libsForQt5.callPackage ../applications/blockchains/bitcoin-abc {