Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fixtures, 6 pytestCheckHook, 7 pythonOlder, 8 requests, 9 requests-mock, 10 rich, 11 setuptools, 12 tomli, 13 urllib3, 14}: 15 16buildPythonPackage rec { 17 pname = "podman"; 18 version = "5.5.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.9"; 22 23 src = fetchFromGitHub { 24 owner = "containers"; 25 repo = "podman-py"; 26 tag = "v${version}"; 27 hash = "sha256-c8uU5WZsZufi/QNJkXh2Z1bmoM/oOm6+rggm4J+pnIc="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 requests 34 urllib3 35 ] 36 ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 37 38 optional-dependencies = { 39 progress_bar = [ rich ]; 40 }; 41 42 nativeCheckInputs = [ 43 fixtures 44 pytestCheckHook 45 requests-mock 46 ]; 47 48 preCheck = '' 49 export HOME=$(mktemp -d) 50 ''; 51 52 pythonImportsCheck = [ "podman" ]; 53 54 disabledTests = [ 55 # Integration tests require a running container setup 56 "AdapterIntegrationTest" 57 "ContainersIntegrationTest" 58 "ContainersExecIntegrationTests" 59 "ImagesIntegrationTest" 60 "ManifestsIntegrationTest" 61 "NetworksIntegrationTest" 62 "PodsIntegrationTest" 63 "SecretsIntegrationTest" 64 "SystemIntegrationTest" 65 "VolumesIntegrationTest" 66 ]; 67 68 meta = with lib; { 69 description = "Python bindings for Podman's RESTful API"; 70 homepage = "https://github.com/containers/podman-py"; 71 changelog = "https://github.com/containers/podman-py/releases/tag/${src.tag}"; 72 license = licenses.asl20; 73 maintainers = with maintainers; [ fab ]; 74 }; 75}