3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/pyelftools/default.nix
2021-01-15 08:57:47 -08:00

35 lines
836 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, stdenv
}:
buildPythonPackage rec {
pname = "pyelftools";
version = "0.27";
src = fetchFromGitHub {
owner = "eliben";
repo = pname;
rev = "v${version}";
sha256 = "09igdym2qj2fvfcazbz25qybmgz7ccrn25xn3havfkdkka0z0i3p";
};
doCheck = stdenv.is64bit && !stdenv.isDarwin;
checkPhase = ''
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" test/external_tools/readelf
${python.interpreter} test/all_tests.py
'';
pythonImportsCheck = [ "elftools" ];
meta = with lib; {
description = "Python library for analyzing ELF files and DWARF debugging information";
homepage = "https://github.com/eliben/pyelftools";
license = licenses.publicDomain;
maintainers = with maintainers; [ igsha pamplemousse ];
};
}