2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "headerparser";
|
|
|
|
version = "0.4.0";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "pyproject";
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jwodder";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-KJJt85iC/4oBoIelB2zUJVyHSppFem/22v6F30P5nYM=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tox.ini \
|
|
|
|
--replace "--cov=headerparser" "" \
|
|
|
|
--replace "--no-cov-on-fail" "" \
|
|
|
|
--replace "--flakes" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"headerparser"
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
description = "Module to parse key-value pairs in the style of RFC 822 (e-mail) headers";
|
2021-12-06 16:07:01 +00:00
|
|
|
homepage = "https://github.com/jwodder/headerparser";
|
|
|
|
license = with licenses; [ mit ];
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ ayazhafiz ];
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|