1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, setuptools 5, pytest-mock 6, pytestCheckHook 7, pythonOlder 8, six 9}: 10 11buildPythonPackage rec { 12 pname = "headerparser"; 13 version = "0.4.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchFromGitHub { 19 owner = "jwodder"; 20 repo = pname; 21 rev = "v${version}"; 22 hash = "sha256-KJJt85iC/4oBoIelB2zUJVyHSppFem/22v6F30P5nYM="; 23 }; 24 25 nativeBuildInputs = [ 26 setuptools 27 ]; 28 29 propagatedBuildInputs = [ 30 six 31 ]; 32 33 checkInputs = [ 34 pytest-mock 35 pytestCheckHook 36 ]; 37 38 postPatch = '' 39 substituteInPlace tox.ini \ 40 --replace "--cov=headerparser" "" \ 41 --replace "--no-cov-on-fail" "" \ 42 --replace "--flakes" "" 43 ''; 44 45 pythonImportsCheck = [ 46 "headerparser" 47 ]; 48 49 meta = with lib; { 50 description = "Module to parse key-value pairs in the style of RFC 822 (e-mail) headers"; 51 homepage = "https://github.com/jwodder/headerparser"; 52 license = with licenses; [ mit ]; 53 maintainers = with maintainers; [ ayazhafiz ]; 54 }; 55}