summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/libear/default.nix
blob: 19f831be9f9f0852c71ba54faee0833277b941d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  lib,
  llvmPackages,
  buildPythonPackage,
}:
let
  inherit (llvmPackages) clang-unwrapped;
in
buildPythonPackage rec {
  pname = "libear";
  inherit (clang-unwrapped) version;

  pyproject = false;

  src = clang-unwrapped.lib + "/lib/libear";

  dontUnpack = true;

  installPhase = ''
    LIBPATH="$(toPythonPath "$out")/libear"
    mkdir -p "$LIBPATH"

    install -t "$LIBPATH" $src/*
  '';

  pythonImportsCheck = [ "libear" ];

  meta = {
    description = "Hooks into build systems to listen to which files are opened";
    homepage = "https://github.com/llvm/llvm-project/tree/llvmorg-${version}/clang/tools/scan-build-py/lib/libear";
    license = with lib.licenses; [
      asl20
      llvm-exception
    ];
    maintainers = with lib.maintainers; [ RossSmyth ];
  };
}