2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
untokenize,
|
2021-04-22 02:08:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "unify";
|
|
|
|
version = "0.5";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.9";
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "myint";
|
|
|
|
repo = "unify";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-cWV/Q+LbeIxnQNqyatRWQUF8X+HHlQdc10y9qJ7v3dA=";
|
2021-04-22 02:08:21 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ untokenize ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "unify" ];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/myint/unify/issues/21
|
|
|
|
"test_format_code"
|
|
|
|
"test_format_code_with_backslash_in_comment"
|
|
|
|
];
|
2021-04-22 02:08:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Modifies strings to all use the same quote where possible";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "unify";
|
2021-04-22 02:08:21 +00:00
|
|
|
homepage = "https://github.com/myint/unify";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ FlorianFranzen ];
|
|
|
|
};
|
|
|
|
}
|