depot/third_party/nixpkgs/pkgs/development/python-modules/pyelftools/default.nix
Default email a5adf1ddd8 Project import generated by Copybara.
GitOrigin-RevId: b3616bd96400ce0252c241d76fcafb64389defc6
2021-01-15 23:18:51 +01:00

34 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 ];
};
}