2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchpatch,
|
|
|
|
poetry-core,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
|
|
|
types-colorama,
|
|
|
|
types-setuptools,
|
2022-09-22 12:36:57 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
buildPythonPackage rec {
|
2022-09-22 12:36:57 +00:00
|
|
|
pname = "beautysh";
|
|
|
|
version = "6.2.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lovesegfault";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-rPeGRcyNK45Y7OvtzaIH93IIzexBf/jM1SzYP0phQ1o=";
|
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
patches = [
|
|
|
|
# https://github.com/lovesegfault/beautysh/pull/247
|
|
|
|
(fetchpatch {
|
|
|
|
name = "poetry-to-poetry-core.patch";
|
|
|
|
url = "https://github.com/lovesegfault/beautysh/commit/5f4fcac083fa68568a50f3c2bcee3ead0f3ca7c5.patch";
|
|
|
|
hash = "sha256-H/kIJKww5ouWu8rmRkaMOXcsq2daZWDdwxBqbc99x0s=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'types-setuptools = "^57.4.0"' 'types-setuptools = "*"'
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ poetry-core ];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
colorama
|
|
|
|
setuptools
|
|
|
|
types-colorama
|
|
|
|
types-setuptools
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "beautysh" ];
|
2022-09-22 12:36:57 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tool for beautifying Bash scripts";
|
|
|
|
homepage = "https://github.com/lovesegfault/beautysh";
|
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2023-08-10 07:59:29 +00:00
|
|
|
mainProgram = "beautysh";
|
2022-09-22 12:36:57 +00:00
|
|
|
};
|
|
|
|
}
|