Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyaftership / default.nix
blob7c1c76c4adb5bb45e1be26e5c04c875afed2f7a2
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pythonOlder
5 , aiohttp
6 , aresponses
7 , pytest-asyncio
8 , pytestCheckHook
9 }:
11 buildPythonPackage rec {
12   pname = "pyaftership";
13   version = "23.1.0";
14   format = "setuptools";
16   disabled = pythonOlder "3.7";
18   src = fetchFromGitHub {
19     owner = "ludeeus";
20     repo = pname;
21     rev = "refs/tags/${version}";
22     hash = "sha256-njlDScmxIYWxB4EL9lOSGCXqZDzP999gI9EkpcZyFlE=";
23   };
25   propagatedBuildInputs = [
26     aiohttp
27   ];
29   nativeCheckInputs = [
30     aresponses
31     pytest-asyncio
32     pytestCheckHook
33   ];
35   postPatch = ''
36     # Upstream is releasing with the help of a CI to PyPI, GitHub releases
37     # are not in their focus
38     substituteInPlace setup.py \
39       --replace 'version="main",' 'version="${version}",'
40   '';
42   pythonImportsCheck = [
43     "pyaftership"
44   ];
46   meta = with lib; {
47     description = "Python wrapper package for the AfterShip API";
48     homepage = "https://github.com/ludeeus/pyaftership";
49     changelog = "https://github.com/ludeeus/pyaftership/releases/tag/${version}";
50     license = licenses.mit;
51     maintainers = with maintainers; [ jamiemagee ];
52   };