1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 21:50:55 +00:00

python2Packages.pyqt4: partial clean up

This commit is contained in:
Jan Tojnar 2019-03-02 18:07:19 +01:00 committed by Frederik Rietdijk
parent 34fd15c8aa
commit ca50e4937e
2 changed files with 17 additions and 17 deletions

View file

@ -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 ];

View file

@ -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;
};