depot/third_party/nixpkgs/pkgs/by-name/cm/cmake-lint/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
1,018 B
Nix

{
lib,
fetchFromGitHub,
python3Packages,
testers,
cmake-lint,
}:
python3Packages.buildPythonApplication rec {
pname = "cmake-lint";
version = "1.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "cmake-lint";
repo = "cmake-lint";
rev = "refs/tags/${version}";
hash = "sha256-/OuWwerBlJynEibaYo+jkLpHt4x9GZrqMRJNxgrDBlM=";
};
nativeBuildInputs = [ python3Packages.setuptools ];
pythonImportsCheck = [ "cmakelint" ];
nativeCheckInputs = with python3Packages; [
pytestCheckHook
nose
];
checkPhase = ''
nosetests
'';
passthru.tests = {
version = testers.testVersion { package = cmake-lint; };
};
meta = {
description = "Static code checker for CMake files";
homepage = "https://github.com/cmake-lint/cmake-lint";
changelog = "https://github.com/cmake-lint/cmake-lint/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.luftmensch-luftmensch ];
mainProgram = "cmakelint";
};
}