2022-08-12 12:06:08 +00:00
|
|
|
{ lib, stdenv, fetchPypi, buildPythonPackage, packaging, ply, toml, fetchpatch }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "sip";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "6.7.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
pname = "sip";
|
|
|
|
inherit version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-nb+KDnyNdtFkLi/dP1PmpSL3wwmA5Sd2PEV2DCUFz78=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
propagatedBuildInputs = [ packaging ply toml ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# There aren't tests
|
|
|
|
doCheck = false;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# FIXME: Why isn't this detected automatically?
|
|
|
|
# Needs to be specified in pyproject.toml, e.g.:
|
|
|
|
# [tool.sip.bindings.MODULE]
|
|
|
|
# tags = [PLATFORM_TAG]
|
|
|
|
platform_tag =
|
|
|
|
if stdenv.targetPlatform.isLinux then
|
|
|
|
"WS_X11"
|
|
|
|
else if stdenv.targetPlatform.isDarwin then
|
|
|
|
"WS_MACX"
|
|
|
|
else if stdenv.targetPlatform.isWindows then
|
|
|
|
"WS_WIN"
|
|
|
|
else
|
|
|
|
throw "unsupported platform";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonImportsCheck = [ "sipbuild" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Creates C++ bindings for Python modules";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://riverbankcomputing.com/";
|
2021-05-20 23:08:51 +00:00
|
|
|
license = licenses.gpl3Only;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ nrdxp ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|