aboutsummaryrefslogtreecommitdiff
path: root/misc/clangbuildanalyzer.nix
blob: d73fa8bbb7b057ae63776ecc04882b525fc1ec54 (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
# Upstreaming here, can be deleted once it's upstreamed:
# https://github.com/NixOS/nixpkgs/pull/297102
{
  stdenv,
  lib,
  cmake,
  fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "clangbuildanalyzer";
  version = "1.5.0";

  src = fetchFromGitHub {
    owner = "aras-p";
    repo = "ClangBuildAnalyzer";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-kmgdk634zM0W0OoRoP/RzepArSipa5bNqdVgdZO9gxo=";
  };

  nativeBuildInputs = [ cmake ];

  meta = {
    description = "Tool for analyzing Clang's -ftrace-time files";
    homepage = "https://github.com/aras-p/ClangBuildAnalyzer";
    maintainers = with lib.maintainers; [ lf- ];
    license = lib.licenses.unlicense;
    platforms = lib.platforms.unix;
    # `long long int` != `size_t`
    # There's no convenient lib.platforms.32bit or anything, but it's easy enough to do ourselves.
    badPlatforms = lib.filter (plat: (lib.systems.elaborate plat).is32bit) lib.platforms.all;
    mainProgram = "ClangBuildAnalyzer";
  };
})