1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-04 03:25:02 +00:00
nixpkgs/pkgs/development/python-modules/pyqt/4.x.nix
Vincent Laporte 81a2b58c39 nixpkgs: remove redundant attribute sip
Because:

 1. It is a mere alias of `pythonPackages.sip`
 2. It is usually not needed since propagated by `pyqt4`
 3. It makes it easy to have a packages depend on two different versions
 of sip
2014-12-23 19:37:21 +01:00

51 lines
1.5 KiB
Nix

{ stdenv, fetchurl, python, pythonPackages, qt4, pythonDBus, pkgconfig, lndir, makeWrapper }:
let version = "4.10.2"; # kde410.pykde4 doesn't build with 4.10.3
in
stdenv.mkDerivation {
name = "PyQt-x11-gpl-${version}";
src = fetchurl {
url = "mirror://sourceforge/pyqt/PyQt4/PyQt-${version}/PyQt-x11-gpl-${version}.tar.gz";
sha256 = "1zp69caqq195ymp911d0cka8619q78hzmfxvj7c51w2y53zg4z3l";
};
configurePhase = ''
mkdir -p $out
lndir ${pythonDBus} $out
export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
substituteInPlace configure.py \
--replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'"
configureFlagsArray=( \
--confirm-license --bindir $out/bin \
--destdir $out/lib/${python.libPrefix}/site-packages \
--plugin-destdir $out/lib/qt4/plugins --sipdir $out/share/sip \
--dbus=$out/include/dbus-1.0 --verbose)
${python.executable} configure.py $configureFlags "''${configureFlagsArray[@]}"
'';
buildInputs = [ python pkgconfig makeWrapper qt4 lndir ];
propagatedBuildInputs = [ pythonPackages.sip ];
postInstall = ''
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done
'';
enableParallelBuilding = true;
meta = {
description = "Python bindings for Qt";
license = "GPL";
homepage = http://www.riverbankcomputing.co.uk;
maintainers = [ stdenv.lib.maintainers.sander ];
platforms = stdenv.lib.platforms.mesaPlatforms;
};
}