2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
2021-08-05 21:33:18 +00:00
|
|
|
, cacert
|
2021-06-28 23:13:55 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, python3Packages
|
|
|
|
}:
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
let chia = python3Packages.buildPythonApplication rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "chia";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "1.5.1";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Chia-Network";
|
|
|
|
repo = "chia-blockchain";
|
|
|
|
rev = version;
|
2021-08-05 21:33:18 +00:00
|
|
|
fetchSubmodules = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
hash = "sha256-FzKdb6Z/ykKYjpjCr7QR5fxXPNnQbW3bBY97t7DxS90=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
patches = [
|
|
|
|
# chia tries to put lock files in the python modules directory
|
|
|
|
./dont_lock_in_store.patch
|
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "==" ">="
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
cp ${cacert}/etc/ssl/certs/ca-bundle.crt mozilla-ca/cacert.pem
|
2021-09-18 10:52:07 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
python3Packages.setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
# give a hint to setuptools-scm on package version
|
2021-05-20 23:08:51 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}";
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2022-03-10 19:12:11 +00:00
|
|
|
aiofiles
|
2021-05-20 23:08:51 +00:00
|
|
|
aiohttp
|
|
|
|
aiosqlite
|
|
|
|
bitstring
|
|
|
|
blspy
|
|
|
|
chiapos
|
|
|
|
chiavdf
|
|
|
|
chiabip158
|
2022-08-12 12:06:08 +00:00
|
|
|
chia-rs
|
2021-05-20 23:08:51 +00:00
|
|
|
click
|
|
|
|
clvm
|
|
|
|
clvm-rs
|
|
|
|
clvm-tools
|
2022-08-12 12:06:08 +00:00
|
|
|
clvm-tools-rs
|
2021-09-18 10:52:07 +00:00
|
|
|
colorama
|
2021-05-20 23:08:51 +00:00
|
|
|
colorlog
|
|
|
|
concurrent-log-handler
|
|
|
|
cryptography
|
2022-03-10 19:12:11 +00:00
|
|
|
dnslib
|
2022-09-09 14:08:57 +00:00
|
|
|
dnspython
|
2021-09-18 10:52:07 +00:00
|
|
|
fasteners
|
2022-03-30 09:31:56 +00:00
|
|
|
filelock
|
2021-05-20 23:08:51 +00:00
|
|
|
keyrings-cryptfile
|
|
|
|
pyyaml
|
|
|
|
setproctitle
|
|
|
|
setuptools # needs pkg_resources at runtime
|
|
|
|
sortedcontainers
|
2021-09-18 10:52:07 +00:00
|
|
|
watchdog
|
2021-05-20 23:08:51 +00:00
|
|
|
websockets
|
2022-03-10 19:12:11 +00:00
|
|
|
zstd
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
pytestCheckHook
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# Testsuite is expensive and non-deterministic, so it is available in
|
|
|
|
# passthru.tests instead.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_spend_through_n"
|
|
|
|
"test_spend_zero_coin"
|
2021-09-18 10:52:07 +00:00
|
|
|
"test_default_cached_master_passphrase"
|
|
|
|
"test_using_legacy_keyring"
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=`mktemp -d`
|
|
|
|
'';
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
passthru.tests = {
|
|
|
|
chiaWithTests = chia.overrideAttrs (_: { doCheck = true; });
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00: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-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
in chia
|