Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / pylaunches / default.nix
blob9adf3abfc61e16a186ce468e83f6f775426faa59
1 { lib
2 , aiohttp
3 , aresponses
4 , buildPythonPackage
5 , fetchFromGitHub
6 , pytestCheckHook
7 , pytest-asyncio
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "pylaunches";
13   version = "1.4.0";
14   format = "setuptools";
16   disabled = pythonOlder "3.8";
18   src = fetchFromGitHub {
19     owner = "ludeeus";
20     repo = pname;
21     rev = version;
22     sha256 = "sha256-bIcnYcbfAwjet3cg97y+ujFfY2916ANk4sw0sZoU59g=";
23   };
25   propagatedBuildInputs = [
26     aiohttp
27   ];
29   nativeCheckInputs = [
30     aresponses
31     pytestCheckHook
32     pytest-asyncio
33   ];
35   postPatch = ''
36     # Upstream doesn't set version in the repo
37     substituteInPlace setup.py \
38       --replace 'version="main",' 'version="${version}",' \
39       --replace ', "pytest-runner"' ""
40   '';
42   pythonImportsCheck = [
43     "pylaunches"
44   ];
46   meta = with lib; {
47     description = "Python module to get information about upcoming space launches";
48     homepage = "https://github.com/ludeeus/pylaunches";
49     license = licenses.mit;
50     maintainers = with maintainers; [ fab ];
51   };