about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/qscintilla/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/qscintilla/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/qscintilla/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/qscintilla/default.nix b/nixpkgs/pkgs/development/python-modules/qscintilla/default.nix
new file mode 100644
index 000000000000..91c2009744f7
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/qscintilla/default.nix
@@ -0,0 +1,43 @@
+{ stdenv
+, buildPythonPackage
+, disabledIf
+, isPy3k
+, isPyPy
+, pkgs
+, python
+, pyqt4
+}:
+
+disabledIf (isPy3k || isPyPy)
+  (buildPythonPackage rec {
+    # TODO: Qt5 support
+    name = "qscintilla-${version}";
+    version = pkgs.qscintilla.version;
+    format = "other";
+
+    src = pkgs.qscintilla.src;
+
+    nativeBuildInputs = [ pkgs.xorg.lndir ];
+
+    buildInputs = [ pyqt4.qt pyqt4 ];
+
+    preConfigure = ''
+      mkdir -p $out
+      lndir ${pyqt4} $out
+      rm -rf "$out/nix-support"
+      cd Python
+      ${python.executable} ./configure-old.py \
+          --destdir $out/lib/${python.libPrefix}/site-packages/PyQt4 \
+          --apidir $out/api/${python.libPrefix} \
+          -n ${pkgs.qscintilla}/include \
+          -o ${pkgs.qscintilla}/lib \
+          --sipdir $out/share/sip
+    '';
+
+    meta = with stdenv.lib; {
+      description = "A Python binding to QScintilla, Qt based text editing control";
+      license = licenses.lgpl21Plus;
+      maintainers = with maintainers; [ danbst ];
+      platforms = platforms.unix;
+    };
+  })