btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / development / python-modules / annotated-types / default.nix
bloba69159a7a173e5137442ef95486ecd25fb79a687
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   hatchling,
6   typing-extensions,
7   pytestCheckHook,
8   pythonOlder,
9 }:
11 buildPythonPackage rec {
12   pname = "annotated-types";
13   version = "0.7.0";
14   format = "pyproject";
16   src = fetchFromGitHub {
17     owner = "annotated-types";
18     repo = "annotated-types";
19     rev = "refs/tags/v${version}";
20     hash = "sha256-I1SPUKq2WIwEX5JmS3HrJvrpNrKDu30RWkBRDFE+k9A=";
21   };
23   nativeBuildInputs = [ hatchling ];
25   propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [ typing-extensions ];
27   pythonImportsCheck = [ "annotated_types" ];
29   nativeCheckInputs = [ pytestCheckHook ];
31   meta = with lib; {
32     description = "Reusable constraint types to use with typing.Annotated";
33     homepage = "https://github.com/annotated-types/annotated-types";
34     changelog = "https://github.com/annotated-types/annotated-types/releases/tag/${lib.removePrefix "refs/tags/" src.rev}";
35     license = licenses.mit;
36     maintainers = with maintainers; [ blaggacao ];
37   };