kdePackages.kirigami-addons: 1.5.0 -> 1.6.0 (#360539)
[NixPkgs.git] / pkgs / development / python-modules / birch / default.nix
blob772ab25109e4c1b7ba7d42ed14a1a7732107e766
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
6   setuptools,
7   strct,
8   pytestCheckHook,
9   pytest-cov-stub,
10   pyyaml,
13 buildPythonPackage rec {
14   pname = "birch";
15   version = "0.0.35";
16   pyproject = true;
18   src = fetchFromGitHub {
19     owner = "shaypal5";
20     repo = "birch";
21     rev = "v${version}";
22     hash = "sha256-KdQZzQJvJ+logpcLQfaqqEEZJ/9VmNTQX/a4v0oBC98=";
23   };
25   patches = [
26     # https://github.com/shaypal5/birch/pull/4
27     (fetchpatch {
28       name = "fix-versioneer-on-python312.patch";
29       url = "https://github.com/shaypal5/birch/commit/84d597b2251ebb76fb15fb70fc86c83baa19dc0b.patch";
30       hash = "sha256-xXADCSIhq1ARny2twzrhR1J8LkMFWFl6tmGxrM8RvkU=";
31     })
32   ];
34   postPatch = ''
35     # configure correct version, which fails due to missing .git
36     substituteInPlace versioneer.py birch/_version.py \
37       --replace-fail '"0+unknown"' '"${version}"'
38   '';
40   nativeBuildInputs = [ setuptools ];
42   dependencies = [ strct ];
44   pythonImportsCheck = [
45     "birch"
46     "birch.casters"
47     "birch.exceptions"
48     "birch.paths"
49   ];
51   nativeCheckInputs = [
52     pytestCheckHook
53     pytest-cov-stub
54     pyyaml
55   ];
57   preCheck = ''
58     export HOME="$(mktemp -d)"
59   '';
61   meta = with lib; {
62     description = "Simple hierarchical configuration for Python packages";
63     homepage = "https://github.com/shaypal5/birch";
64     license = licenses.mit;
65     maintainers = with maintainers; [ pbsds ];
66   };