about summary refs log tree commit diff
path: root/pkgs/development/python-modules/editorconfig/default.nix
blob: 6449a3da767ca35f93a712f3132365c99c01c6b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, buildPythonPackage
, fetchgit
, cmake
}:

buildPythonPackage rec {
  pname = "editorconfig";
  version = "0.12.3";

  # fetchgit used to ensure test submodule is available
  src = fetchgit {
    url = "https://github.com/editorconfig/editorconfig-core-py";
    rev = "1a8fb62b9941fded9e4fb83a3d0599427f5484cb"; # Not tagged
    sha256 = "0vx8rl7kii72965jsi01mdsz9rfi1q9bwy13x47iaqm6rmcwc1rb";
  };

  nativeBuildInputs = [
    cmake
  ];

  dontUseCmakeConfigure = true;

  checkPhase = ''
    cmake .
    # utf_8_char fails with Python 3
    ctest -E "utf_8_char" .
  '';

  pythonImportsCheck = [ "editorconfig" ];

  meta = with lib; {
    description = "EditorConfig File Locator and Interpreter for Python";
    homepage = "https://editorconfig.org";
    license = licenses.psfl;
    maintainers = with maintainers; [ ];
  };
}