about summary refs log tree commit diff
path: root/pkgs/desktops/kde-4.14/kdebindings/pykde4.nix
blob: 48d457e10a7f343c8d0db46c54200519a68aa02c (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
{ kde, kdelibs, pythonPackages, kdepimlibs, shared_desktop_ontologies,
  polkit_qt4, boost, lndir, pkgconfig }:

let
  inherit (pythonPackages) python pyqt4;
  pydir = "lib/python${python.majorVersion}";
in kde {

  patches = [ ./pykde4-gcc-5.patch ];

  # todo: polkit isn't found by the build system

  buildInputs = [
    python kdepimlibs shared_desktop_ontologies
    boost polkit_qt4
  ];

  nativeBuildInputs = [ pkgconfig ];

  propagatedBuildInputs = [ pyqt4 ];

  preConfigure =
    ''
      # Symlink PyQt into PyKDE.  This is necessary because PyQt looks
      # in its PyQt4/uic/widget-plugins directory for plugins, and KDE
      # needs to install a plugin.
      mkdir -pv $out/${pydir}
      ${lndir}/bin/lndir ${pyqt4}/${pydir} $out/${pydir}
      cmakeFlagsArray=( "-DSIP_DEFAULT_SIP_DIR=$prefix/share/sip" )
    '';

  meta = {
    description = "Python bindings for KDE";
  };
}