Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, fetchFromGitHub 3, substituteAll 4, python3Packages 5, chia 6, 7}: 8python3Packages.buildPythonApplication rec { 9 pname = "chia-dev-tools"; 10 version = "1.1.5"; 11 12 src = fetchFromGitHub { 13 owner = "Chia-Network"; 14 repo = pname; 15 rev = "v${version}"; 16 hash = "sha256-qWWLQ+SkoRu5cLytwwrslqsKORy+4ebO8brULEFGaF0="; 17 }; 18 19 patches = [ 20 (substituteAll { 21 src = ./fix-paths.patch; 22 inherit chia; 23 }) 24 ]; 25 26 postPatch = '' 27 substituteInPlace setup.py \ 28 --replace "==" ">=" 29 ''; 30 31 nativeBuildInputs = [ 32 python3Packages.setuptools-scm 33 ]; 34 35 # give a hint to setuptools-scm on package version 36 SETUPTOOLS_SCM_PRETEND_VERSION = "v${version}"; 37 38 propagatedBuildInputs = with python3Packages; [ 39 anyio 40 (toPythonModule chia) 41 pytest # required at runtime by the "test" command 42 pytest-asyncio 43 pytimeparse 44 ]; 45 46 nativeCheckInputs = with python3Packages; [ 47 pytestCheckHook 48 ]; 49 50 preCheck = '' 51 export HOME=$(mktemp -d) 52 ''; 53 postCheck = "unset HOME"; 54 55 disabledTests = [ 56 "test_spendbundles" 57 ]; 58 59 meta = with lib; { 60 homepage = "https://www.chia.net/"; 61 description = "Utility for developing in the Chia ecosystem: Chialisp functions, object inspection, RPC client and more"; 62 license = with licenses; [ asl20 ]; 63 maintainers = teams.chia.members; 64 }; 65}