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