depot/third_party/nixpkgs/pkgs/development/python-modules/yasi/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

43 lines
1,010 B
Nix

{
lib,
buildPythonPackage,
colorama,
fetchFromGitHub,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "yasi";
version = "2.1.2";
pyproject = true;
src = fetchFromGitHub {
owner = "nkmathew";
repo = "yasi-sexp-indenter";
rev = "v${version}";
hash = "sha256-xKhVTmh/vrtBkatxtk8R4yqbGroH0I+xTKNYUpuikt4=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [ colorama ];
nativeCheckInputs = [ pytestCheckHook ];
postPatch = ''
substituteInPlace setup.py \
--replace "test.test_yasi" "tests.test_yasi"
'';
pythonImportsCheck = [ "yasi" ];
meta = with lib; {
description = "Dialect-aware s-expression indenter written in Python and newLISP";
mainProgram = "yasi";
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 ];
};
}