diff options
Diffstat (limited to 'pkgs/development/python-modules/pyqt/4.x.nix')
-rw-r--r-- | pkgs/development/python-modules/pyqt/4.x.nix | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index a747d42e418..9f7c75a02d3 100644 --- a/pkgs/development/python-modules/pyqt/4.x.nix +++ b/pkgs/development/python-modules/pyqt/4.x.nix @@ -1,14 +1,8 @@ -{ stdenv, fetchurl, pythonPackages, qt4, pkgconfig, lndir, dbus, makeWrapper }: +{ stdenv, fetchurl, buildPythonPackage, python, dbus-python, sip, qt4, pkgconfig, lndir, dbus, makeWrapper }: -let +buildPythonPackage rec { pname = "PyQt-x11-gpl"; version = "4.12"; - - inherit (pythonPackages) buildPythonPackage python dbus-python sip; -in buildPythonPackage { - pname = pname; - name = pname + "-" + version; - version = version; format = "other"; src = fetchurl { @@ -16,7 +10,7 @@ in buildPythonPackage { sha256 = "1nw8r88a5g2d550yvklawlvns8gd5slw53yy688kxnsa65aln79w"; }; - configurePhase = '' + postPatch = '' mkdir -p $out lndir ${dbus-python} $out rm -rf "$out/nix-support" @@ -32,17 +26,24 @@ in buildPythonPackage { --replace "qt_macx_spec = 'macx-g++'" "qt_macx_spec = 'unsupported/macx-clang-libc++'" # for bootstrapping phase \ ''} - configureFlagsArray=( \ - --confirm-license --bindir $out/bin \ - --destdir $out/${python.sitePackages} \ - --plugin-destdir $out/lib/qt4/plugins --sipdir $out/share/sip/PyQt4 \ - --dbus=${dbus-python}/include/dbus-1.0 --verbose) - - ${python.executable} configure.py $configureFlags "''${configureFlagsArray[@]}" + chmod +x configure.py + sed -i '1i#!${python.interpreter}' configure.py ''; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ makeWrapper qt4 lndir dbus ]; + configureScript = "./configure.py"; + dontAddPrefix = true; + configureFlags = [ + "--confirm-license" + "--bindir=${placeholder "out"}/bin" + "--destdir=${placeholder "out"}/${python.sitePackages}" + "--plugin-destdir=${placeholder "out"}/lib/qt4/plugins" + "--sipdir=${placeholder "out"}/share/sip/PyQt4" + "--dbus=${stdenv.lib.getDev dbus-python}/include/dbus-1.0" + "--verbose" + ]; + + nativeBuildInputs = [ pkgconfig lndir makeWrapper qt4 ]; + buildInputs = [ qt4 dbus ]; propagatedBuildInputs = [ sip ]; |