3
0
Fork 0
forked from mirrors/nixpkgs

chia-plotter: init at unstable-2021-07-12

This commit is contained in:
iko 2021-07-31 15:53:35 +03:00
parent 468cf873d5
commit a6581d356d
No known key found for this signature in database
GPG key ID: 82C257048D1026F2
3 changed files with 117 additions and 0 deletions

View file

@ -0,0 +1,65 @@
{ lib
, fetchFromGitHub
, stdenv
, libsodium
, cmake
, substituteAll
, pythonPackages
}:
stdenv.mkDerivation {
pname = "chia-plotter";
version = "unstable-2021-07-12";
src = fetchFromGitHub {
owner = "madMAx43v3r";
repo = "chia-plotter";
rev = "974d6e5f1440f68c48492122ca33828a98864dfc";
sha256 = "0dliswvqmi3wq9w8jp0sb0z74n5k37608sig6r60z206g2bwhjja";
fetchSubmodules = true;
};
patches = [
# prevent CMake from trying to get libraries on the Internet
(substituteAll {
src = ./dont_fetch_dependencies.patch;
pybind11_src = pythonPackages.pybind11.src;
relic_src = fetchFromGitHub {
owner = "relic-toolkit";
repo = "relic";
rev = "1885ae3b681c423c72b65ce1fe70910142cf941c";
hash = "sha256-tsSZTcssl8t7Nqdex4BesgQ+ACPgTdtHnJFvS9josN0=";
};
})
];
nativeBuildInputs = [ cmake ];
buildInputs = [ libsodium ];
# These flags come from the upstream build script:
# https://github.com/madMAx43v3r/chia-plotter/blob/974d6e5f1440f68c48492122ca33828a98864dfc/make_devel.sh#L7
CXXFLAGS = "-O3 -fmax-errors=1";
cmakeFlags = [
"-DARITH=easy"
"-DBUILD_BLS_PYTHON_BINDINGS=false"
"-DBUILD_BLS_TESTS=false"
"-DBUILD_BLS_BENCHMARKS=false"
];
installPhase = ''
runHook preInstall
install -D -m 755 chia_plot $out/bin/chia_plot
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/madMAx43v3r/chia-plotter";
description = "New implementation of a chia plotter which is designed as a processing pipeline";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ ilyakooo0 ];
};
}

View file

@ -0,0 +1,50 @@
diff --git a/lib/bls-signatures/python-bindings/CMakeLists.txt b/lib/bls-signatures/python-bindings/CMakeLists.txt
index 255e3bb..5f99c3a 100644
--- a/lib/bls-signatures/python-bindings/CMakeLists.txt
+++ b/lib/bls-signatures/python-bindings/CMakeLists.txt
@@ -6,8 +6,7 @@ include(FetchContent)
FetchContent_Declare(
pybind11
- GIT_REPOSITORY https://github.com/pybind/pybind11.git
- GIT_TAG v2.6.2
+ SOURCE_DIR @pybind11_src@
)
FetchContent_MakeAvailable(pybind11 relic)
diff --git a/lib/bls-signatures/src/CMakeLists.txt b/lib/bls-signatures/src/CMakeLists.txt
index b762b5d..e06073b 100644
--- a/lib/bls-signatures/src/CMakeLists.txt
+++ b/lib/bls-signatures/src/CMakeLists.txt
@@ -4,18 +4,11 @@ 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 "1885ae3b681c423c72b65ce1fe70910142cf941c")
-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)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 970ec74..948441a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,6 +38,7 @@ include_directories(
${BLAKE3_PATH}
${CMAKE_BINARY_DIR}/_deps/relic-src/include
${CMAKE_BINARY_DIR}/_deps/relic-build/include
+ @relic_src@/include
)
IF (WIN32)

View file

@ -28636,6 +28636,8 @@ in
chia = callPackage ../applications/blockchains/chia { };
chia-plotter = callPackage ../applications/blockchains/chia-plotter { };
clightning = callPackage ../applications/blockchains/clightning { };
bitcoin-abc = libsForQt5.callPackage ../applications/blockchains/bitcoin-abc {