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.3.3"; 20 disabled = pythonOlder "3.6"; 21 22 src = fetchFromGitHub { 23 owner = "vxgmichel"; 24 repo = pname; 25 rev = "v${version}"; 26 sha256 = "1hjdhj1y9xhq1i36r7g2lccsicbvgm7lzkyrxygs16dw11ah46mx"; 27 }; 28 29 checkInputs = [ 30 pytest-asyncio 31 pytestCheckHook 32 ]; 33 34 postPatch = '' 35 substituteInPlace setup.cfg \ 36 --replace "--cov aioconsole --count 2" "" 37 ''; 38 39 pythonImportsCheck = [ "aioconsole" ]; 40 41 meta = with lib; { 42 description = "Asynchronous console and interfaces for asyncio"; 43 homepage = "https://github.com/vxgmichel/aioconsole"; 44 license = licenses.gpl3Only; 45 maintainers = with maintainers; [ catern ]; 46 }; 47}