1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 cmake, 7}: 8 9buildPythonPackage rec { 10 pname = "editorconfig"; 11 version = "0.17.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "editorconfig"; 16 repo = "editorconfig-core-py"; 17 rev = "v${version}"; 18 hash = "sha256-3wEW2FMBKBS9mekYgmYG3Ohd3plCtYDFejwG3W6B9IA="; 19 fetchSubmodules = true; 20 }; 21 22 build-system = [ setuptools ]; 23 24 nativeCheckInputs = [ cmake ]; 25 26 dontUseCmakeConfigure = true; 27 28 checkPhase = '' 29 runHook preCheck 30 31 cmake . 32 ctest . 33 34 runHook postCheck 35 ''; 36 37 pythonImportsCheck = [ "editorconfig" ]; 38 39 meta = with lib; { 40 description = "EditorConfig File Locator and Interpreter for Python"; 41 mainProgram = "editorconfig"; 42 homepage = "https://github.com/editorconfig/editorconfig-core-py"; 43 license = licenses.psfl; 44 maintainers = with maintainers; [ nickcao ]; 45 }; 46}