2017-07-19 12:45:28 +01:00
|
|
|
{ stdenv, binutils, cmake, fetchFromGitHub }:
|
2016-11-08 20:13:50 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-07-19 12:45:28 +01:00
|
|
|
version = "2017-10-05";
|
2016-11-08 20:13:50 +00:00
|
|
|
name = "bloaty-${version}";
|
|
|
|
|
2017-07-19 12:45:28 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "bloaty";
|
|
|
|
rev = "e47b21b01ceecf001e1965e9da249d48d86a1749";
|
|
|
|
sha256 = "1il3z49hi0b07agjwr5fg1wzysfxsamfv1snvlp33vrlyl1m7cbm";
|
2016-11-08 20:13:50 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2017-07-19 12:45:28 +01:00
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2016-11-08 20:13:50 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-07-19 12:45:28 +01:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace src/bloaty.cc \
|
|
|
|
--replace "c++filt" \
|
2017-12-14 00:53:23 +00:00
|
|
|
"${binutils.bintools}/bin/c++filt"
|
2016-11-08 20:13:50 +00:00
|
|
|
'';
|
|
|
|
|
2017-07-19 12:45:28 +01:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = "ctest";
|
|
|
|
|
2016-11-08 20:13:50 +00:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 {.,$out/bin}/bloaty
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "a size profiler for binaries";
|
|
|
|
homepage = https://github.com/google/bloaty;
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.dtzWill ];
|
|
|
|
};
|
|
|
|
}
|