Merge pull request #210765 from lourkeur/chia-dev-tools

authored by Sandro and committed by GitHub b62fe509 e04f1c4e

+78
+63
pkgs/applications/blockchains/chia-dev-tools/default.nix
···
··· 1 + { lib 2 + , fetchFromGitHub 3 + , substituteAll 4 + , python3Packages 5 + , chia 6 + , 7 + }: 8 + python3Packages.buildPythonApplication rec { 9 + pname = "chia-dev-tools"; 10 + version = "1.1.4"; 11 + 12 + src = fetchFromGitHub { 13 + owner = "Chia-Network"; 14 + repo = pname; 15 + rev = "v${version}"; 16 + hash = "sha256-lE7FTSDqVS6AstcxZSMdQwgygMvcvh1fqYVTTSSNZpA="; 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 + (toPythonModule chia) 40 + pytimeparse 41 + ]; 42 + 43 + checkInputs = with python3Packages; [ 44 + pytestCheckHook 45 + pytest-asyncio 46 + ]; 47 + 48 + preCheck = '' 49 + export HOME=$(mktemp -d) 50 + ''; 51 + postCheck = "unset HOME"; 52 + 53 + disabledTests = [ 54 + "test_spendbundles" 55 + ]; 56 + 57 + meta = with lib; { 58 + homepage = "https://www.chia.net/"; 59 + description = "Utility for developing in the Chia ecosystem: Chialisp functions, object inspection, RPC client and more"; 60 + license = with licenses; [ asl20 ]; 61 + maintainers = teams.chia.members; 62 + }; 63 + }
+13
pkgs/applications/blockchains/chia-dev-tools/fix-paths.patch
···
··· 1 + diff --git a/cdv/cmds/sim_utils.py b/cdv/cmds/sim_utils.py 2 + index e59ba8f..20912ff 100644 3 + --- a/cdv/cmds/sim_utils.py 4 + +++ b/cdv/cmds/sim_utils.py 5 + @@ -67,7 +67,7 @@ async def start_async(root_path: Path, group: Any, restart: bool) -> None: 6 + 7 + from chia.cmds.start_funcs import async_start 8 + 9 + - sys.argv[0] = str(Path(sys.executable).parent / "chia") # this gives the correct path to the chia executable 10 + + sys.argv[0] = "@chia@/bin/chia" # this gives the correct path to the chia executable 11 + if root_path.exists(): 12 + config = load_config(root_path, "config.yaml") 13 + await async_start(root_path, config, group, restart)
+2
pkgs/top-level/all-packages.nix
··· 34000 34001 chia = callPackage ../applications/blockchains/chia { }; 34002 34003 chia-plotter = callPackage ../applications/blockchains/chia-plotter { }; 34004 34005 clboss = callPackage ../applications/blockchains/clboss { };
··· 34000 34001 chia = callPackage ../applications/blockchains/chia { }; 34002 34003 + chia-dev-tools = callPackage ../applications/blockchains/chia-dev-tools { }; 34004 + 34005 chia-plotter = callPackage ../applications/blockchains/chia-plotter { }; 34006 34007 clboss = callPackage ../applications/blockchains/clboss { };