depot/third_party/nixpkgs/pkgs/development/python-modules/pylaunches/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

52 lines
1.1 KiB
Nix

{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pytestCheckHook,
pytest-asyncio,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pylaunches";
version = "2.0.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "ludeeus";
repo = "pylaunches";
rev = "refs/tags/${version}";
hash = "sha256-NewzzZuiXwaWU59bu+M2QcSfydL1khvw/YJkbZ58W2Q=";
};
postPatch = ''
# Upstream doesn't set version in the repo
substituteInPlace pyproject.toml \
--replace-fail 'version = "0"' 'version = "${version}"'
'';
build-system = [ poetry-core ];
dependencies = [ aiohttp ];
nativeCheckInputs = [
aresponses
pytestCheckHook
pytest-asyncio
];
pythonImportsCheck = [ "pylaunches" ];
meta = with lib; {
description = "Python module to get information about upcoming space launches";
homepage = "https://github.com/ludeeus/pylaunches";
changelog = "https://github.com/ludeeus/pylaunches/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}