1{
2 lib,
3 llvmPackages,
4 buildPythonPackage,
5}:
6let
7 inherit (llvmPackages) clang-unwrapped;
8in
9buildPythonPackage rec {
10 pname = "libear";
11 inherit (clang-unwrapped) version;
12
13 format = "other";
14
15 src = clang-unwrapped.lib + "/lib/libear";
16
17 dontUnpack = true;
18
19 installPhase = ''
20 LIBPATH="$(toPythonPath "$out")/libear"
21 mkdir -p "$LIBPATH"
22
23 install -t "$LIBPATH" $src/*
24 '';
25
26 pythonImportsCheck = [ "libear" ];
27
28 meta = {
29 description = "Hooks into build systems to listen to which files are opened";
30 homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/lib/libear";
31 license = with lib.licenses; [
32 asl20
33 llvm-exception
34 ];
35 maintainers = with lib.maintainers; [ RossSmyth ];
36 };
37}