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