2021-06-09 23:00:09 +02:00
|
|
|
{ lib
|
2021-07-28 14:42:33 +02:00
|
|
|
, cacert
|
2021-06-09 23:00:09 +02:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
}:
|
2021-05-09 12:26:25 +02:00
|
|
|
|
2021-08-28 16:32:42 +02:00
|
|
|
let chia = python3Packages.buildPythonApplication rec {
|
2021-05-09 12:26:25 +02:00
|
|
|
pname = "chia";
|
2021-11-05 12:18:13 +01:00
|
|
|
version = "1.2.11";
|
2021-05-09 12:26:25 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Chia-Network";
|
|
|
|
repo = "chia-blockchain";
|
|
|
|
rev = version;
|
2021-07-28 14:42:33 +02:00
|
|
|
fetchSubmodules = true;
|
2021-11-05 12:18:13 +01:00
|
|
|
sha256 = "sha256-hRpZce8ydEsyq7htNfzlRSKPwMAOUurC3uiQpX6WiB8=";
|
2021-05-09 12:26:25 +02:00
|
|
|
};
|
|
|
|
|
2021-09-12 15:42:03 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "==" ">="
|
|
|
|
|
2021-11-08 21:56:25 +01:00
|
|
|
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
|
2021-09-12 15:42:03 +02:00
|
|
|
'';
|
|
|
|
|
2021-05-09 12:26:25 +02:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-06-03 12:09:11 +02:00
|
|
|
# give a hint to setuptools-scm on package version
|
2021-05-09 12:26:25 +02:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
|
|
aiohttp
|
|
|
|
aiosqlite
|
|
|
|
bitstring
|
|
|
|
blspy
|
|
|
|
chiapos
|
|
|
|
chiavdf
|
|
|
|
chiabip158
|
|
|
|
click
|
|
|
|
clvm
|
|
|
|
clvm-rs
|
|
|
|
clvm-tools
|
2021-08-27 11:45:20 +02:00
|
|
|
colorama
|
2021-05-09 12:26:25 +02:00
|
|
|
colorlog
|
|
|
|
concurrent-log-handler
|
|
|
|
cryptography
|
2021-11-05 12:18:13 +01:00
|
|
|
dnspythonchia
|
2021-08-27 11:45:20 +02:00
|
|
|
fasteners
|
2021-05-09 12:26:25 +02:00
|
|
|
keyrings-cryptfile
|
|
|
|
pyyaml
|
|
|
|
setproctitle
|
|
|
|
setuptools # needs pkg_resources at runtime
|
|
|
|
sortedcontainers
|
2021-08-27 11:45:20 +02:00
|
|
|
watchdog
|
2021-05-09 12:26:25 +02:00
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
2021-06-09 23:00:09 +02:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
pytestCheckHook
|
2021-05-09 12:26:25 +02:00
|
|
|
];
|
|
|
|
|
2021-08-28 16:32:42 +02:00
|
|
|
# Testsuite is expensive and non-deterministic, so it is available in
|
|
|
|
# passthru.tests instead.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-05-09 12:26:25 +02:00
|
|
|
disabledTests = [
|
|
|
|
"test_spend_through_n"
|
|
|
|
"test_spend_zero_coin"
|
2021-08-27 11:45:20 +02:00
|
|
|
"test_default_cached_master_passphrase"
|
|
|
|
"test_using_legacy_keyring"
|
2021-05-09 12:26:25 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=`mktemp -d`
|
|
|
|
'';
|
|
|
|
|
2021-08-28 16:32:42 +02:00
|
|
|
passthru.tests = {
|
|
|
|
chiaWithTests = chia.overrideAttrs (_: { doCheck = true; });
|
|
|
|
};
|
|
|
|
|
2021-05-09 12:26:25 +02:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.chia.net/";
|
|
|
|
description = "Chia is a modern cryptocurrency built from scratch, designed to be efficient, decentralized, and secure.";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = teams.chia.members;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
2021-08-28 16:32:42 +02:00
|
|
|
};
|
|
|
|
in chia
|