Files
nixpkgs/pkgs/development/python-modules/editorconfig/default.nix
T
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

50 lines
919 B
Nix

{ 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";
mainProgram = "editorconfig";
homepage = "https://github.com/editorconfig/editorconfig-core-py";
license = licenses.psfl;
maintainers = with maintainers; [ nickcao ];
};
}