summary refs log tree commit diff
path: root/pkgs/development/tools/bloaty/default.nix
blob: ff24e7b7c1cdfc8f8f70fd8b420bbb62064d2944 (plain) (blame)
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
{ lib, stdenv, cmake, zlib, fetchFromGitHub }:

stdenv.mkDerivation rec {
  version = "1.1";
  pname = "bloaty";

  src = fetchFromGitHub {
    owner = "google";
    repo = "bloaty";
    rev = "v${version}";
    sha256 = "1556gb8gb8jwf5mwxppcqz3mp269b5jhd51kj341iqkbn27zzngk";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ cmake ];

  buildInputs = [ zlib ];

  doCheck = true;

  installPhase = ''
    install -Dm755 {.,$out/bin}/bloaty
  '';

  meta = with lib; {
    description = "a size profiler for binaries";
    homepage = "https://github.com/google/bloaty";
    license = licenses.asl20;
    platforms = platforms.unix;
    maintainers = with maintainers; [ dtzWill ];
  };
}