2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, buildPythonPackage
|
2023-04-12 12:48:02 +00:00
|
|
|
, colorama
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
, 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-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorama
|
|
|
|
];
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = [
|
2023-04-12 12:48:02 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "test.test_yasi" "tests.test_yasi"
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "yasi" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A dialect-aware s-expression indenter written in Python and newLISP";
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|