1{
2 lib,
3 aiohttp,
4 aresponses,
5 buildPythonPackage,
6 fetchFromGitHub,
7 poetry-core,
8 pytestCheckHook,
9 pytest-asyncio,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 pname = "pylaunches";
15 version = "2.0.0";
16 pyproject = true;
17
18 disabled = pythonOlder "3.11";
19
20 src = fetchFromGitHub {
21 owner = "ludeeus";
22 repo = "pylaunches";
23 tag = version;
24 hash = "sha256-NewzzZuiXwaWU59bu+M2QcSfydL1khvw/YJkbZ58W2Q=";
25 };
26
27 postPatch = ''
28 # Upstream doesn't set version in the repo
29 substituteInPlace pyproject.toml \
30 --replace-fail 'version = "0"' 'version = "${version}"'
31 '';
32
33 build-system = [ poetry-core ];
34
35 dependencies = [ aiohttp ];
36
37 nativeCheckInputs = [
38 aresponses
39 pytestCheckHook
40 pytest-asyncio
41 ];
42
43 pythonImportsCheck = [ "pylaunches" ];
44
45 meta = with lib; {
46 description = "Python module to get information about upcoming space launches";
47 homepage = "https://github.com/ludeeus/pylaunches";
48 changelog = "https://github.com/ludeeus/pylaunches/releases/tag/${version}";
49 license = licenses.mit;
50 maintainers = with maintainers; [ fab ];
51 };
52}