at 22.05-pre 65 lines 1.7 kB view raw
1{ lib 2, fetchFromGitHub 3, stdenv 4, libsodium 5, cmake 6, substituteAll 7, pythonPackages 8}: 9 10stdenv.mkDerivation { 11 pname = "chia-plotter"; 12 version = "1.1.7"; 13 14 src = fetchFromGitHub { 15 owner = "madMAx43v3r"; 16 repo = "chia-plotter"; 17 rev = "18cad340858f0dbcc8dafd0bda1ce1af0fe58c65"; 18 sha256 = "sha256-lXjeqcjn3+LtnVYngdM1T3on7V7wez4oOAZ0RpKJXMM="; 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}