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