about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/qscintilla/default.nix
blob: 06010b40ed9673c63de49835cb0d0e6f8c8e776b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ stdenv
, buildPythonPackage
, disabledIf
, isPy3k
, isPyPy
, pkgs
, python
, pyqt4
}:

disabledIf (isPy3k || isPyPy)
  (buildPythonPackage rec {
    # TODO: Qt5 support
    pname = "qscintilla";
    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;
    };
  })