2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv
|
|
|
|
, buildPythonPackage
|
2020-10-07 09:15:18 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyelftools";
|
2020-10-07 09:15:18 +00:00
|
|
|
version = "unstable-2020-09-23";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "eliben";
|
|
|
|
repo = pname;
|
|
|
|
rev = "ab84e68837113b2d700ad379d94c1dd4a73125ea";
|
|
|
|
sha256 = "sha256-O7l1kj0k8bOSOtZJVzS674oVnM+X3oP00Ybs0qjb64Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-06 00:33:48 +00:00
|
|
|
doCheck = stdenv.is64bit && !stdenv.isDarwin;
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkPhase = ''
|
2020-10-07 09:15:18 +00:00
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" test/external_tools/readelf
|
2020-04-24 23:36:52 +00:00
|
|
|
${python.interpreter} test/all_tests.py
|
|
|
|
'';
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
pythonImportsCheck = [ "elftools" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A library for analyzing ELF files and DWARF debugging information";
|
|
|
|
homepage = "https://github.com/eliben/pyelftools";
|
|
|
|
license = licenses.publicDomain;
|
2020-10-07 09:15:18 +00:00
|
|
|
maintainers = with maintainers; [ igsha pamplemousse ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|