1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchPypi, 6 setuptools-scm, 7 pyelftools, 8 importlib-metadata, 9 pretend, 10 pytestCheckHook, 11 # non-python dependencies 12 bzip2, 13 gnutar, 14 patchelf, 15 unzip, 16}: 17 18buildPythonPackage rec { 19 pname = "auditwheel"; 20 version = "6.0.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-ZCLEq2Qh0j41XJHplGkmzVMrn99G8rX/2vGr/p7inmc="; 28 }; 29 30 nativeBuildInputs = [ setuptools-scm ]; 31 32 propagatedBuildInputs = [ pyelftools ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 33 34 nativeCheckInputs = [ 35 pretend 36 pytestCheckHook 37 ]; 38 39 # Integration tests require docker and networking 40 disabledTestPaths = [ "tests/integration" ]; 41 42 # Ensure that there are no undeclared deps 43 postCheck = '' 44 PATH= PYTHONPATH= $out/bin/auditwheel --version > /dev/null 45 ''; 46 47 makeWrapperArgs = [ 48 "--prefix" 49 "PATH" 50 ":" 51 (lib.makeBinPath [ 52 bzip2 53 gnutar 54 patchelf 55 unzip 56 ]) 57 ]; 58 59 meta = with lib; { 60 changelog = "https://github.com/pypa/auditwheel/blob/${version}/CHANGELOG.md"; 61 description = "Auditing and relabeling cross-distribution Linux wheels"; 62 homepage = "https://github.com/pypa/auditwheel"; 63 license = with licenses; [ 64 mit # auditwheel and nibabel 65 bsd2 # from https://github.com/matthew-brett/delocate 66 bsd3 # from https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-projects/pax-utils/lddtree.py 67 ]; 68 mainProgram = "auditwheel"; 69 maintainers = with maintainers; [ davhau ]; 70 platforms = platforms.linux; 71 }; 72}