2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
fetchpatch,
|
|
|
|
pbr,
|
|
|
|
requests,
|
|
|
|
pytestCheckHook,
|
|
|
|
waitress,
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-unixsocket";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "0.3.0";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
hash = "sha256-KDBCg+qTV9Rf/1itWxHkdwjPv1gGgXqlmyo2Mijulx4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/msabramo/requests-unixsocket/pull/69
|
|
|
|
(fetchpatch {
|
|
|
|
name = "urllib3-2-compatibility.patch";
|
|
|
|
url = "https://github.com/msabramo/requests-unixsocket/commit/39b9c64847a52ddc8c6d14ff414a6a7a3f6358d9.patch";
|
|
|
|
hash = "sha256-DFtjhk33JLCu7FW6XI7uf2klNmwzvh2QNwxUb4W223Q=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ pbr ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ requests ];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
waitress
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "requests_unixsocket" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Use requests to talk HTTP via a UNIX domain socket";
|
|
|
|
homepage = "https://github.com/msabramo/requests-unixsocket";
|
|
|
|
license = licenses.asl20;
|
2022-02-10 20:34:41 +00:00
|
|
|
maintainers = with maintainers; [ catern ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|