nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 65 lines 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, chardet 5, requests 6, ruamel-yaml 7, setuptools-scm 8, six 9, semver 10, pytestCheckHook 11, openapi-spec-validator 12}: 13 14buildPythonPackage rec { 15 pname = "prance"; 16 version = "0.21.8.0"; 17 18 src = fetchFromGitHub { 19 owner = "RonnyPfannschmidt"; 20 repo = pname; 21 rev = "v${version}"; 22 fetchSubmodules = true; 23 sha256 = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ="; 24 }; 25 26 SETUPTOOLS_SCM_PRETEND_VERSION = version; 27 28 nativeBuildInputs = [ 29 setuptools-scm 30 ]; 31 32 propagatedBuildInputs = [ 33 chardet 34 requests 35 ruamel-yaml 36 six 37 semver 38 ]; 39 40 checkInputs = [ 41 pytestCheckHook 42 openapi-spec-validator 43 ]; 44 45 postPatch = '' 46 substituteInPlace setup.cfg \ 47 --replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" 48 ''; 49 50 # Disable tests that require network 51 disabledTestPaths = [ 52 "tests/test_convert.py" 53 ]; 54 disabledTests = [ 55 "test_fetch_url_http" 56 ]; 57 pythonImportsCheck = [ "prance" ]; 58 59 meta = with lib; { 60 description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser"; 61 homepage = "https://github.com/RonnyPfannschmidt/prance"; 62 license = licenses.mit; 63 maintainers = [ maintainers.costrouc ]; 64 }; 65}