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