anki-bin: 24.06.3 -> 24.11 (#360722)
[NixPkgs.git] / pkgs / development / python-modules / beautysh / default.nix
blob8c8af617f833b59b4422f314ddc77fcf83a9ffb9
2   lib,
3   buildPythonPackage,
4   colorama,
5   fetchFromGitHub,
6   fetchpatch,
7   poetry-core,
8   pytest7CheckHook,
9   setuptools,
10   types-colorama,
11   types-setuptools,
14 buildPythonPackage rec {
15   pname = "beautysh";
16   version = "6.2.1";
17   format = "pyproject";
19   src = fetchFromGitHub {
20     owner = "lovesegfault";
21     repo = pname;
22     rev = "v${version}";
23     hash = "sha256-rPeGRcyNK45Y7OvtzaIH93IIzexBf/jM1SzYP0phQ1o=";
24   };
26   patches = [
27     # https://github.com/lovesegfault/beautysh/pull/247
28     (fetchpatch {
29       name = "poetry-to-poetry-core.patch";
30       url = "https://github.com/lovesegfault/beautysh/commit/5f4fcac083fa68568a50f3c2bcee3ead0f3ca7c5.patch";
31       hash = "sha256-H/kIJKww5ouWu8rmRkaMOXcsq2daZWDdwxBqbc99x0s=";
32     })
33   ];
35   postPatch = ''
36     substituteInPlace pyproject.toml \
37       --replace 'types-setuptools = "^57.4.0"' 'types-setuptools = "*"'
38   '';
40   nativeBuildInputs = [ poetry-core ];
42   propagatedBuildInputs = [
43     colorama
44     setuptools
45     types-colorama
46     types-setuptools
47   ];
49   nativeCheckInputs = [ pytest7CheckHook ];
51   pythonImportsCheck = [ "beautysh" ];
53   meta = with lib; {
54     description = "Tool for beautifying Bash scripts";
55     homepage = "https://github.com/lovesegfault/beautysh";
56     license = with licenses; [ asl20 ];
57     maintainers = with maintainers; [ fab ];
58     mainProgram = "beautysh";
59   };