about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/editorconfig/default.nix
blob: f55442b2f584e57808e6c0cc9cd7bf4ec761c6c0 (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
39
40
41
42
43
44
45
46
47
48
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, cmake
}:

buildPythonPackage rec {
  pname = "editorconfig";
  version = "0.12.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "editorconfig";
    repo = "editorconfig-core-py";
    rev = "v${version}";
    hash = "sha256-+m674bLj6xs7MWU+8BMixEwy7/TjyES0lvCLLogTDHQ=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    setuptools
  ];

  nativeCheckInputs = [
    cmake
  ];

  dontUseCmakeConfigure = true;

  checkPhase = ''
    runHook preCheck

    cmake .
    ctest .

    runHook postCheck
  '';

  pythonImportsCheck = [ "editorconfig" ];

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