Make kdebindings compile with newer sip
[nixpkgs-libre.git] / pkgs / desktops / kde-4.5 / bindings / default.nix
blob03a2051321e0e7ee689d5641df69d924cf3b41a8
1 { kde, lib, cmake, perl, python, sip, pyqt4, zlib, libpng, freetype, fontconfig, qt4, boost
2 , kdelibs, kdepimlibs, automoc4, soprano, akonadi, attica, polkit_qt_1, ruby
3 }:
5 # This function will only build the pykde4 module. I don't need the other bindings and
6 # some bindings are even broken.
8 kde.package rec {
9   patches = [ ./python-site-packages-install-dir.diff ./sip-4.11.patch ];
11   preConfigure = ''
12     CUSTOM_RUBY_SITE_ARCH_DIR=$(ruby -r rbconfig -e "print Config::CONFIG['sitearchdir']" | sed -e "s@${ruby}@$out@")
13     CUSTOM_RUBY_SITE_LIB_DIR=$(ruby -r rbconfig -e "print Config::CONFIG['sitelibdir']" | sed -e "s@${ruby}@$out@")
14     CUSTOM_PERL_SITE_ARCH_DIR=$(perl -MConfig -e 'print $Config{sitearch}' | sed -e "s@${perl}@$out@")
15     cmakeFlagsArray+=(
16       -DSIP_DEFAULT_SIP_DIR=$out/share/sip
17       -DCUSTOM_RUBY_SITE_ARCH_DIR=$CUSTOM_RUBY_SITE_ARCH_DIR
18       -DCUSTOM_RUBY_SITE_LIB_DIR=$CUSTOM_RUBY_SITE_LIB_DIR
19       -DCUSTOM_PERL_SITE_ARCH_DIR=$CUSTOM_PERL_SITE_ARCH_DIR
20     )
21   '';
22   
23   # TODO: okular, qimageblitz, qwt5, qscintilla2, c#
24   buildInputs = [ cmake perl python sip pyqt4 zlib libpng freetype fontconfig qt4 boost
25           kdelibs kdepimlibs automoc4 soprano akonadi attica polkit_qt_1 ruby ];
27   meta = {
28     description = "KDE bindings";
29     longDescription = "Provides KDE bindings for several languages such as Java, Smoke and Python";
30     license = "LGPL";
31     kde = {
32       name = "kdebindings";
33       version = "4.5.2";
34     };
35   };