2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-03-30 09:31:56 +00:00
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "editorconfig";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.12.4";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "editorconfig";
|
|
|
|
repo = "editorconfig-core-py";
|
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-+m674bLj6xs7MWU+8BMixEwy7/TjyES0lvCLLogTDHQ=";
|
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-04 02:40:35 +00:00
|
|
|
cmake
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
runHook preCheck
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
cmake .
|
2024-02-29 20:09:43 +00:00
|
|
|
ctest .
|
|
|
|
|
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
pythonImportsCheck = [ "editorconfig" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "EditorConfig File Locator and Interpreter for Python";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "editorconfig";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/editorconfig/editorconfig-core-py";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.psfl;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|