Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / python-modules / compiledb / default.nix
blob1892337dc2d94722b01362676fe80b6e62afe8ea
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytest
5 , bashlex
6 , click
7 , shutilwhich
8 , gcc
9 , coreutils
12 buildPythonPackage rec {
13   pname = "compiledb";
14   version = "0.10.1";
16   src = fetchFromGitHub {
17     owner = "nickdiego";
18     repo = pname;
19     rev = "v${version}";
20     sha256 = "0qricdgqzry7j3rmgwyd43av3c2kxpzkh6f9zcqbzrjkn78qbpd4";
21   };
23   # fix the tests
24   patchPhase = ''
25     substituteInPlace tests/data/multiple_commands_oneline.txt \
26                       --replace /bin/echo ${coreutils}/bin/echo
27   '';
29   checkInputs = [ pytest gcc coreutils ];
30   propagatedBuildInputs = [ click bashlex shutilwhich ];
32   checkPhase = ''
33     pytest
34   '';
36   meta = with lib; {
37     description = "Tool for generating Clang's JSON Compilation Database files";
38     license = licenses.gpl3;
39     homepage = "https://github.com/nickdiego/compiledb";
40     maintainers = with maintainers; [ multun ];
41   };