aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/shiboken2
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2019-10-05 12:43:18 +0000
committerKatharina Fey <kookie@spacekookie.de>2019-10-05 12:44:52 +0000
commitcf85056ba64caf3267d43255ef4a1243e9c8ee3b (patch)
tree3051519e9c8275b870aac43f80af875715c9d124 /nixpkgs/pkgs/development/python-modules/shiboken2
parent1148b1d122bc03e9a3665856c9b7bb96bd4e3994 (diff)
parent2436c27541b2f52deea3a4c1691216a02152e729 (diff)
Add 'nixpkgs/' from commit '2436c27541b2f52deea3a4c1691216a02152e729'
git-subtree-dir: nixpkgs git-subtree-mainline: 1148b1d122bc03e9a3665856c9b7bb96bd4e3994 git-subtree-split: 2436c27541b2f52deea3a4c1691216a02152e729
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/shiboken2')
-rw-r--r--nixpkgs/pkgs/development/python-modules/shiboken2/default.nix36
-rw-r--r--nixpkgs/pkgs/development/python-modules/shiboken2/nix_compile_cflags.patch27
2 files changed, 63 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/shiboken2/default.nix b/nixpkgs/pkgs/development/python-modules/shiboken2/default.nix
new file mode 100644
index 00000000000..9b2062dbf6c
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/shiboken2/default.nix
@@ -0,0 +1,36 @@
+{ buildPythonPackage, python, fetchurl, stdenv, pyside2,
+ cmake, qt5, llvmPackages }:
+
+stdenv.mkDerivation {
+ pname = "shiboken2";
+
+ inherit (pyside2) version src;
+
+ patches = [
+ ./nix_compile_cflags.patch
+ ];
+
+ postPatch = ''
+ cd sources/shiboken2
+ '';
+
+ CLANG_INSTALL_DIR = llvmPackages.libclang.out;
+
+ nativeBuildInputs = [ cmake ];
+ buildInputs = [ llvmPackages.libclang python qt5.qtbase qt5.qtxmlpatterns ];
+
+ cmakeFlags = [
+ "-DBUILD_TESTS=OFF"
+ ];
+
+ postInstall = ''
+ rm $out/bin/shiboken_tool.py
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Generator for the PySide2 Qt bindings";
+ license = with licenses; [ gpl2 lgpl21 ];
+ homepage = "https://wiki.qt.io/Qt_for_Python";
+ maintainers = with maintainers; [ gebner ];
+ };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/shiboken2/nix_compile_cflags.patch b/nixpkgs/pkgs/development/python-modules/shiboken2/nix_compile_cflags.patch
new file mode 100644
index 00000000000..0884c020e83
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/shiboken2/nix_compile_cflags.patch
@@ -0,0 +1,27 @@
+--- pyside-setup-everywhere-src-5.12.3/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp~ 2019-06-15 10:31:04.712949189 +0200
++++ pyside-setup-everywhere-src-5.12.3/sources/shiboken2/ApiExtractor/clangparser/compilersupport.cpp 2019-06-15 11:52:52.894987343 +0200
+@@ -317,15 +317,15 @@
+ }
+ #endif // NEED_CLANG_BUILTIN_INCLUDES
+
+- // Append the c++ include paths since Clang is unable to find <list> etc
+- // on RHEL 7 with g++ 6.3 or CentOS 7.2.
+- // A fix for this has been added to Clang 5.0, so, the code can be removed
+- // once Clang 5.0 is the minimum version.
+- if (needsGppInternalHeaders()) {
+- const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("g++"));
+- for (const HeaderPath &h : gppPaths) {
+- if (h.path.contains("c++"))
+- headerPaths.append(h);
++ const HeaderPaths gppPaths = gppInternalIncludePaths(QStringLiteral("g++"));
++ for (const HeaderPath &h : gppPaths) {
++ // PySide2 requires that Qt headers are not -isystem
++ // https://bugreports.qt.io/browse/PYSIDE-787
++ if (!h.path.contains("-qt")) {
++ // add using -isystem
++ headerPaths.append(h);
++ } else {
++ headerPaths.append({h.path, HeaderType::Standard});
+ }
+ }
+ #else