1{ stdenv
2, buildPythonPackage
3, fetchPypi
4, python
5}:
6
7buildPythonPackage rec {
8 pname = "pyelftools";
9 version = "0.26";
10
11 src = fetchPypi {
12 inherit pname version;
13 sha256 = "86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2";
14 };
15
16 checkPhase = ''
17 ${python.interpreter} test/all_tests.py
18 '';
19
20 # Tests cannot pass against system-wide readelf
21 # https://github.com/eliben/pyelftools/issues/65
22 doCheck = false;
23
24 meta = with stdenv.lib; {
25 description = "A library for analyzing ELF files and DWARF debugging information";
26 homepage = "https://github.com/eliben/pyelftools";
27 license = licenses.publicDomain;
28 maintainers = [ maintainers.igsha ];
29 };
30
31}