mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-14 15:26:34 +01:00
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:
pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
for f in $(find -name '*.nix'); do
grep -q "$pattern" "$f" || continue
sed -i "/$pattern/d" "$f"
if [ $(grep -c pythonOlder "$f") == 1 ]; then
sed -i '/^\s*pythonOlder,\s*$/d' "$f"
fi
nixfmt "$f"
done
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
python,
|
|
setuptools,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pyelftools";
|
|
version = "0.32";
|
|
pyproject = true;
|
|
|
|
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";
|
|
};
|
|
}
|