2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
typing-extensions,
|
2024-02-07 01:22:34 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "http-sf";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.0.2";
|
2024-02-07 01:22:34 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mnot";
|
|
|
|
repo = "http-sf";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-p2GTCvuRhQVchFiLzoDYop9TUz/DT7eVY6Zioh+/rE8=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
dependencies = [ typing-extensions ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
# Tests require external data (https://github.com/httpwg/structured-field-tests)
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "http_sf" ];
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to parse and serialise HTTP structured field values";
|
|
|
|
homepage = "https://github.com/mnot/http-sf";
|
|
|
|
changelog = "https://github.com/mnot/http-sf/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|