2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
2024-01-02 11:29:13 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2024-01-02 11:29:13 +00:00
|
|
|
, setuptools-scm
|
|
|
|
, pyelftools
|
|
|
|
, importlib-metadata
|
|
|
|
, pretend
|
|
|
|
, pytestCheckHook
|
|
|
|
# non-python dependencies
|
|
|
|
, bzip2
|
2021-05-20 23:08:51 +00:00
|
|
|
, gnutar
|
2024-01-02 11:29:13 +00:00
|
|
|
, patchelf
|
2021-05-20 23:08:51 +00:00
|
|
|
, unzip
|
|
|
|
}:
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "auditwheel";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "6.0.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2021-05-20 23:08:51 +00:00
|
|
|
inherit pname version;
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-ZCLEq2Qh0j41XJHplGkmzVMrn99G8rX/2vGr/p7inmc=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pyelftools
|
2024-01-02 11:29:13 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-05-20 23:08:51 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
pretend
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Integration tests require docker and networking
|
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/integration"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Ensure that there are no undeclared deps
|
2021-05-20 23:08:51 +00:00
|
|
|
postCheck = ''
|
|
|
|
PATH= PYTHONPATH= $out/bin/auditwheel --version > /dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--prefix" "PATH" ":" (lib.makeBinPath [ bzip2 gnutar patchelf unzip ])
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-01-02 11:29:13 +00:00
|
|
|
changelog = "https://github.com/pypa/auditwheel/blob/${version}/CHANGELOG.md";
|
2021-05-20 23:08:51 +00:00
|
|
|
description = "Auditing and relabeling cross-distribution Linux wheels";
|
|
|
|
homepage = "https://github.com/pypa/auditwheel";
|
|
|
|
license = with licenses; [
|
|
|
|
mit # auditwheel and nibabel
|
|
|
|
bsd2 # from https://github.com/matthew-brett/delocate
|
|
|
|
bsd3 # from https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "auditwheel";
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ davhau ];
|
2021-12-06 16:07:01 +00:00
|
|
|
platforms = platforms.linux;
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|