Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / beautysh / default.nix
blobc41414075f3819091ae5ddce2f211bf299a899b5
1 { lib
2 , buildPythonPackage
3 , colorama
4 , fetchFromGitHub
5 , fetchpatch
6 , poetry-core
7 , pytestCheckHook
8 , setuptools
9 , types-colorama
10 , types-setuptools
13 buildPythonPackage rec {
14   pname = "beautysh";
15   version = "6.2.1";
16   format = "pyproject";
18   src = fetchFromGitHub {
19     owner = "lovesegfault";
20     repo = pname;
21     rev = "v${version}";
22     hash = "sha256-rPeGRcyNK45Y7OvtzaIH93IIzexBf/jM1SzYP0phQ1o=";
23   };
25   patches = [
26     # https://github.com/lovesegfault/beautysh/pull/247
27     (fetchpatch {
28       name = "poetry-to-poetry-core.patch";
29       url = "https://github.com/lovesegfault/beautysh/commit/5f4fcac083fa68568a50f3c2bcee3ead0f3ca7c5.patch";
30       hash = "sha256-H/kIJKww5ouWu8rmRkaMOXcsq2daZWDdwxBqbc99x0s=";
31     })
32   ];
34   postPatch = ''
35     substituteInPlace pyproject.toml \
36       --replace 'types-setuptools = "^57.4.0"' 'types-setuptools = "*"'
37   '';
39   nativeBuildInputs = [
40     poetry-core
41   ];
43   propagatedBuildInputs = [
44     colorama
45     setuptools
46     types-colorama
47     types-setuptools
48   ];
50   nativeCheckInputs = [
51     pytestCheckHook
52   ];
54   pythonImportsCheck = [
55     "beautysh"
56   ];
58   meta = with lib; {
59     description = "Tool for beautifying Bash scripts";
60     homepage = "https://github.com/lovesegfault/beautysh";
61     license = with licenses; [ asl20 ];
62     maintainers = with maintainers; [ fab ];
63     mainProgram = "beautysh";
64   };