nixpkgs/pkgs/development/tools/bloaty/default.nix

37 lines
806 B
Nix
Raw Normal View History

{ stdenv, binutils, cmake, zlib, fetchFromGitHub }:
2016-11-08 21:13:50 +01:00
stdenv.mkDerivation rec {
version = "2018-05-22";
2016-11-08 21:13:50 +01:00
name = "bloaty-${version}";
src = fetchFromGitHub {
owner = "google";
repo = "bloaty";
rev = "054788b091ccfd43b05b9817062139145096d440";
sha256 = "0pmv66137ipzsjjdz004n61pz3aipjhh3b0w0y1406clqpwkvpjm";
2016-11-08 21:13:50 +01:00
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake ];
buildInputs = [ zlib ];
2016-11-08 21:13:50 +01:00
enableParallelBuilding = true;
2016-11-08 21:13:50 +01:00
doCheck = true;
checkPhase = "ctest";
2016-11-08 21:13:50 +01: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 ];
};
}