Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, flit-scm
5, pytestCheckHook
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "exceptiongroup";
11 version = "1.0.4";
12 format = "pyproject";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "agronholm";
18 repo = "exceptiongroup";
19 rev = version;
20 hash = "sha256-csyDWVvcsAMzgomb0xq0NbVP7qYQpDv9obBGANlwiVI=";
21 };
22
23 nativeBuildInputs = [
24 flit-scm
25 ];
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 checkInputs = [
30 pytestCheckHook
31 ];
32
33 pythonImportsCheck = [
34 "exceptiongroup"
35 ];
36
37 meta = with lib; {
38 description = "Backport of PEP 654 (exception groups)";
39 homepage = "https://github.com/agronholm/exceptiongroup";
40 changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst";
41 license = with licenses; [ mit ];
42 maintainers = with maintainers; [ fab ];
43 };
44}