From ca50e4937e1342da9ea981c0449982c267b171d5 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 2 Mar 2019 18:07:19 +0100 Subject: [PATCH] python2Packages.pyqt4: partial clean up --- pkgs/development/python-modules/pyqt/4.x.nix | 33 ++++++++++---------- pkgs/top-level/python-packages.nix | 1 - 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/pyqt/4.x.nix b/pkgs/development/python-modules/pyqt/4.x.nix index 2efef654dd11..9f7c75a02d30 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,15 +26,22 @@ 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 ''; + 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 ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c5933ea1fd62..5acc12fe4ba9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -695,7 +695,6 @@ in { pyres = callPackage ../development/python-modules/pyres { }; pyqt4 = callPackage ../development/python-modules/pyqt/4.x.nix { - pythonPackages = self; inherit (pkgs) pkgconfig; };