mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
43 lines
905 B
Nix
43 lines
905 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytest
|
|
, bashlex
|
|
, click
|
|
, shutilwhich
|
|
, gcc
|
|
, coreutils
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "compiledb";
|
|
version = "0.10.1";
|
|
|
|
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";
|
|
license = licenses.gpl3;
|
|
homepage = "https://github.com/nickdiego/compiledb";
|
|
maintainers = with maintainers; [ multun ];
|
|
};
|
|
}
|