Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / sip / 4.x.nix
blob0e1db82e8af0f64f259fc3d5aa46ac9595c0a440
1 { lib, fetchurl, fetchpatch, buildPythonPackage, python, isPyPy, pythonAtLeast, sip-module ? "sip" }:
3 buildPythonPackage rec {
4   pname = sip-module;
5   version = "4.19.25";
6   format = "other";
8   disabled = isPyPy;
10   src = fetchurl {
11     url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz";
12     sha256 = "04a23cgsnx150xq86w1z44b6vr2zyazysy9mqax0fy346zlr77dk";
13   };
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   ];
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   '';
30   enableParallelBuilding = true;
32   pythonImportsCheck = [ sip-module "sipconfig" ];
34   doCheck = true;
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   };