1{ stdenv
2, buildPythonPackage
3, fetchgit
4, cmake
5}:
6
7buildPythonPackage rec {
8 pname = "editorconfig";
9 version = "0.12.2";
10
11 # fetchgit used to ensure test submodule is available
12 src = fetchgit {
13 url = "https://github.com/editorconfig/editorconfig-core-py";
14 rev = "596da5e06ebee05bdbdc6224203c79c4d3c6486a"; # Not tagged
15 sha256 = "05cbp971b0zix7kfxkk7ndxb4ax1l21frwc00d4g78mk4sdz6dig";
16 };
17
18 nativeBuildInputs = [ cmake ];
19
20 dontUseCmakeConfigure = true;
21
22 checkPhase = ''
23 cmake .
24 # utf_8_char fails with python3
25 ctest -E "utf_8_char" .
26 '';
27
28 meta = with stdenv.lib; {
29 homepage = "https://editorconfig.org";
30 description = "EditorConfig File Locator and Interpreter for Python";
31 license = licenses.psfl;
32 };
33
34}