nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchFromGitHub, ctags, perl, elfutils, vtable-dumper }:
2
3stdenv.mkDerivation rec {
4 pname = "abi-dumper";
5 version = "1.2";
6
7 src = fetchFromGitHub {
8 owner = "lvc";
9 repo = "abi-dumper";
10 rev = version;
11 sha256 = "1i00rfnddrrb9lb1l6ib19g3a76pyasl9lb7rqz2p998gav1gjp2";
12 };
13
14 patchPhase = ''
15 substituteInPlace abi-dumper.pl \
16 --replace eu-readelf ${elfutils}/bin/eu-readelf \
17 --replace vtable-dumper ${vtable-dumper}/bin/vtable-dumper \
18 --replace '"ctags"' '"${ctags}/bin/ctags"'
19 '';
20
21 buildInputs = [ elfutils ctags perl vtable-dumper ];
22
23 preBuild = "mkdir -p $out";
24 makeFlags = [ "prefix=$(out)" ];
25
26 meta = with lib; {
27 homepage = "https://github.com/lvc/abi-dumper";
28 description = "Dump ABI of an ELF object containing DWARF debug info";
29 license = licenses.lgpl21;
30 maintainers = [ maintainers.bhipple ];
31 platforms = platforms.all;
32 };
33}