depot/third_party/nixpkgs/pkgs/development/python-modules/headerparser/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

50 lines
984 B
Nix

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