nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 67 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 pytest-asyncio, 7 pytest-cov-stub, 8 pytestCheckHook, 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.2"; 23 pyproject = true; 24 25 src = fetchFromGitHub { 26 owner = "vxgmichel"; 27 repo = "aioconsole"; 28 tag = "v${version}"; 29 hash = "sha256-j4nzt8mvn+AYObh1lvgxS8wWK662KN+OxjJ2b5ZNAcQ="; 30 }; 31 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail " --strict-markers --count 2 -vv" "" 35 ''; 36 37 build-system = [ setuptools ]; 38 39 nativeCheckInputs = [ 40 pytest-asyncio 41 pytest-cov-stub 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 disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 54 # OSError: AF_UNIX path too long 55 "tests/test_server.py::test_uds_server[default]" 56 ]; 57 58 pythonImportsCheck = [ "aioconsole" ]; 59 60 meta = { 61 description = "Asynchronous console and interfaces for asyncio"; 62 changelog = "https://github.com/vxgmichel/aioconsole/releases/tag/v${version}"; 63 homepage = "https://github.com/vxgmichel/aioconsole"; 64 license = lib.licenses.gpl3Only; 65 mainProgram = "apython"; 66 }; 67}