at 23.11-beta 43 lines 1.3 kB view raw
1{ lib, fetchurl, fetchpatch, buildPythonPackage, python, isPyPy, pythonAtLeast, sip-module ? "sip" }: 2 3buildPythonPackage rec { 4 pname = sip-module; 5 version = "4.19.25"; 6 format = "other"; 7 8 disabled = isPyPy; 9 10 src = fetchurl { 11 url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz"; 12 sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk"; 13 }; 14 15 patches = lib.optionals (pythonAtLeast "3.11") [ 16 (fetchpatch { 17 name = "sip-4-python3-11.patch"; 18 url = "https://aur.archlinux.org/cgit/aur.git/plain/python3-11.patch?h=sip4&id=67b5907227e68845cdfafcf050fedb89ed653585"; 19 sha256 = "sha256-cmuz2y5+T8EM/h03G2oboSnnOwrUjVKt2TUQaC9YAdE="; 20 }) 21 ]; 22 23 configurePhase = '' 24 ${python.executable} ./configure.py \ 25 --sip-module ${sip-module} \ 26 -d $out/${python.sitePackages} \ 27 -b $out/bin -e $out/include 28 ''; 29 30 enableParallelBuilding = true; 31 32 pythonImportsCheck = [ sip-module "sipconfig" ]; 33 34 doCheck = true; 35 36 meta = with lib; { 37 description = "Creates C++ bindings for Python modules"; 38 homepage = "https://riverbankcomputing.com/"; 39 license = licenses.gpl2Plus; 40 maintainers = with maintainers; [ lovek323 sander ]; 41 platforms = platforms.all; 42 }; 43}