1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytest-asyncio 5, pytestCheckHook 6, pythonOlder 7}: 8 9# This package provides a binary "apython" which sometimes invokes 10# [sys.executable, '-m', 'aioconsole'] as a subprocess. If apython is 11# run directly out of this derivation, it won't work, because 12# sys.executable will point to a Python binary that is not wrapped to 13# be able to find aioconsole. 14# However, apython will work fine when using python##.withPackages, 15# because with python##.withPackages the sys.executable is already 16# wrapped to be able to find aioconsole and any other packages. 17buildPythonPackage rec { 18 pname = "aioconsole"; 19 version = "0.6.2"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchFromGitHub { 25 owner = "vxgmichel"; 26 repo = pname; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-axUJLh7yg2A+HB0fxBueuNT/rohHVq6svQUZvR2LKzo="; 29 }; 30 31 nativeCheckInputs = [ 32 pytest-asyncio 33 pytestCheckHook 34 ]; 35 36 postPatch = '' 37 substituteInPlace setup.cfg \ 38 --replace "--cov aioconsole --count 2" "" 39 ''; 40 41 __darwinAllowLocalNetworking = true; 42 43 disabledTests = [ 44 "test_interact_syntax_error" 45 # Output and the sandbox don't work well together 46 "test_interact_multiple_indented_lines" 47 ]; 48 49 pythonImportsCheck = [ 50 "aioconsole" 51 ]; 52 53 meta = with lib; { 54 description = "Asynchronous console and interfaces for asyncio"; 55 homepage = "https://github.com/vxgmichel/aioconsole"; 56 license = licenses.gpl3Only; 57 maintainers = with maintainers; [ catern ]; 58 }; 59}