a19cd4ffb1
This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
59 lines
1.1 KiB
Nix
59 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
aiohttp,
|
|
jinja2,
|
|
markupsafe,
|
|
pytest-aiohttp,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
pyyaml,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aiohttp-swagger";
|
|
version = "1.0.15";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cr0hn";
|
|
repo = pname;
|
|
rev = version;
|
|
hash = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
jinja2
|
|
markupsafe
|
|
pyyaml
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-aiohttp
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace "markupsafe~=1.1.1" "markupsafe>=1.1.1" \
|
|
--replace "jinja2~=2.11.2" "jinja2>=2.11.2"
|
|
'';
|
|
|
|
preCheck = ''
|
|
# The custom client is obsolete
|
|
rm tests/conftest.py
|
|
'';
|
|
|
|
pythonImportsCheck = [ "aiohttp_swagger" ];
|
|
|
|
meta = with lib; {
|
|
description = "Swagger API Documentation builder for aiohttp";
|
|
homepage = "https://github.com/cr0hn/aiohttp-swagger";
|
|
license = licenses.mit;
|
|
};
|
|
}
|