2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
colorama,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytestCheckHook,
|
|
|
|
setuptools,
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildPythonPackage rec {
|
2023-04-12 12:48:02 +00:00
|
|
|
pname = "yasi";
|
|
|
|
version = "2.1.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nkmathew";
|
|
|
|
repo = "yasi-sexp-indenter";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-xKhVTmh/vrtBkatxtk8R4yqbGroH0I+xTKNYUpuikt4=";
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ colorama ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2023-04-12 12:48:02 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "test.test_yasi" "tests.test_yasi"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yasi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Dialect-aware s-expression indenter written in Python and newLISP";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "yasi";
|
2023-04-12 12:48:02 +00:00
|
|
|
homepage = "https://github.com/nkmathew/yasi-sexp-indenter";
|
|
|
|
changelog = "https://github.com/nkmathew/yasi-sexp-indenter/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kranzes ];
|
|
|
|
};
|
|
|
|
}
|