blob: e4ec7a9b55d0e1c3c0f637eff08d0b3718e0e76a (
about) (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
python,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "pyelftools";
version = "0.32";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "eliben";
repo = "pyelftools";
tag = "v${version}";
hash = "sha256-58Twjf7ECOPynQ5KPCTDQWdD3nb7ADJZISozWGRGoXM=";
};
build-system = [ setuptools ];
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/run_all_unittests.py
${python.interpreter} test/run_examples_test.py
${python.interpreter} test/run_readelf_tests.py --parallel
'';
pythonImportsCheck = [ "elftools" ];
meta = {
description = "Python library for analyzing ELF files and DWARF debugging information";
homepage = "https://github.com/eliben/pyelftools";
changelog = "https://github.com/eliben/pyelftools/blob/v${version}/CHANGES";
license = with lib.licenses; [
# Public domain with Unlicense waiver.
unlicense
# pyelftools bundles construct library that is licensed under MIT license.
# See elftools/construct/{LICENSE,README} in the source code.
mit
];
maintainers = with lib.maintainers; [
igsha
pamplemousse
];
mainProgram = "readelf.py";
};
}
|