nixpkgs/pkgs/development/python-modules/sip/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, fetchurl, buildPythonPackage, python, isPyPy, sip-module ? "sip" }:
2018-07-01 15:39:07 +01:00
buildPythonPackage rec {
pname = sip-module;
2020-10-07 10:14:41 +01:00
version = "4.19.24";
format = "other";
2018-07-01 15:39:07 +01:00
disabled = isPyPy;
src = fetchurl {
2019-02-25 14:40:06 +00:00
url = "https://www.riverbankcomputing.com/static/Downloads/sip/${version}/sip-${version}.tar.gz";
2020-10-07 10:14:41 +01:00
sha256 = "1ra15vb5i9gkg2vdvh16cq9x2mmzw1yi3xphxs8q34q1pf83gkgd";
};
configurePhase = ''
${python.executable} ./configure.py \
--sip-module ${sip-module} \
2019-08-03 10:46:44 +01:00
-d $out/${python.sitePackages} \
-b $out/bin -e $out/include
'';
enableParallelBuilding = true;
2019-08-03 10:46:44 +01:00
installCheckPhase = let
modules = [
sip-module
"sipconfig"
];
imports = lib.concatMapStrings (module: "import ${module};") modules;
in ''
echo "Checking whether modules can be imported..."
PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH ${python.interpreter} -c "${imports}"
'';
doCheck = true;
2016-08-31 10:01:16 +01:00
meta = with lib; {
description = "Creates C++ bindings for Python modules";
homepage = "http://www.riverbankcomputing.co.uk/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lovek323 sander ];
platforms = platforms.all;
};
}