mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
a67c5f82c0
pyelftools ships a readelf binary for its test suite that is linked against glibc. Replacing this readelf binary with our stdenv version doesn't work.
41 lines
950 B
Nix
41 lines
950 B
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, python
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyelftools";
|
|
version = "0.28";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "eliben";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-+T5C0ah2oj5E8fWaQbuzYRVgD5bSiUbaArrlxNLojvw=";
|
|
};
|
|
|
|
doCheck = stdenv.hostPlatform.system == "x86_64-linux" && stdenv.hostPlatform.isGnu;
|
|
|
|
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 ];
|
|
};
|
|
}
|