at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 pythonOlder, 7 setuptools, 8 pytestCheckHook, 9 untokenize, 10}: 11 12buildPythonPackage rec { 13 pname = "unify"; 14 version = "0.5"; 15 pyproject = true; 16 17 # lib2to3 usage and unmaintained since 2019 18 disabled = pythonOlder "3.9" || pythonAtLeast "3.13"; 19 20 src = fetchFromGitHub { 21 owner = "myint"; 22 repo = "unify"; 23 tag = "v${version}"; 24 hash = "sha256-cWV/Q+LbeIxnQNqyatRWQUF8X+HHlQdc10y9qJ7v3dA="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ untokenize ]; 30 31 nativeCheckInputs = [ pytestCheckHook ]; 32 33 pythonImportsCheck = [ "unify" ]; 34 35 disabledTests = [ 36 # https://github.com/myint/unify/issues/21 37 "test_format_code" 38 "test_format_code_with_backslash_in_comment" 39 ]; 40 41 meta = with lib; { 42 description = "Modifies strings to all use the same quote where possible"; 43 mainProgram = "unify"; 44 homepage = "https://github.com/myint/unify"; 45 license = licenses.mit; 46 maintainers = with maintainers; [ FlorianFranzen ]; 47 }; 48}