python3Packages.compiledb: move to pkgs/by-name (#365250)

This commit is contained in:
Arne Keller
2024-12-18 15:19:00 +01:00
committed by GitHub
3 changed files with 45 additions and 55 deletions
+45
View File
@@ -0,0 +1,45 @@
{
lib,
fetchFromGitHub,
coreutils,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "compiledb";
version = "0.10.1";
pyproject = true;
build-system = [ python3Packages.setuptools ];
src = fetchFromGitHub {
owner = "nickdiego";
repo = "compiledb";
rev = "refs/tags/v${version}";
hash = "sha256-pN2F0bFT5r8w+8kZOP/tU7Cx1SDN81fzkMfnj19jMWM=";
};
dependencies = with python3Packages; [
click
bashlex
shutilwhich
];
# fix the tests
patchPhase = ''
substituteInPlace tests/data/multiple_commands_oneline.txt \
--replace-fail "/bin/echo" "${coreutils}/bin/echo"
'';
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
doCheck = true;
meta = {
description = "Tool for generating Clang's JSON Compilation Database files";
mainProgram = "compiledb";
license = lib.licenses.gpl3Plus;
homepage = "https://github.com/nickdiego/compiledb";
maintainers = with lib.maintainers; [ sigmanificient ];
};
}
@@ -1,53 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytest,
bashlex,
click,
shutilwhich,
gcc,
coreutils,
}:
buildPythonPackage rec {
pname = "compiledb";
version = "0.10.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "nickdiego";
repo = pname;
rev = "v${version}";
sha256 = "0qricdgqzry7j3rmgwyd43av3c2kxpzkh6f9zcqbzrjkn78qbpd4";
};
# fix the tests
patchPhase = ''
substituteInPlace tests/data/multiple_commands_oneline.txt \
--replace /bin/echo ${coreutils}/bin/echo
'';
nativeCheckInputs = [
pytest
gcc
coreutils
];
propagatedBuildInputs = [
click
bashlex
shutilwhich
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Tool for generating Clang's JSON Compilation Database files";
mainProgram = "compiledb";
license = licenses.gpl3;
homepage = "https://github.com/nickdiego/compiledb";
maintainers = with maintainers; [ multun ];
};
}
-2
View File
@@ -2550,8 +2550,6 @@ self: super: with self; {
commonmark = callPackage ../development/python-modules/commonmark { };
compiledb = callPackage ../development/python-modules/compiledb { };
complycube = callPackage ../development/python-modules/complycube { };
compreffor = callPackage ../development/python-modules/compreffor { };