From e2c25b2f6068c85d259557553de6ba4fbaa045ae Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 27 Sep 2015 09:58:27 -0500 Subject: [PATCH] polkitQt: build with Qt 5.5 --- .../libraries/polkit-qt-1/default.nix | 11 ++++++---- .../development/libraries/polkit-qt-1/old.nix | 22 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 8 ++++--- 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/libraries/polkit-qt-1/old.nix diff --git a/pkgs/development/libraries/polkit-qt-1/default.nix b/pkgs/development/libraries/polkit-qt-1/default.nix index b887134e5b93..3715158705cb 100644 --- a/pkgs/development/libraries/polkit-qt-1/default.nix +++ b/pkgs/development/libraries/polkit-qt-1/default.nix @@ -1,7 +1,10 @@ { stdenv, fetchurl, cmake, pkgconfig, polkit, automoc4, glib -, qt4 ? null, qt5 ? null, withQt5 ? false }: +, qt4 ? null +, withQt5 ? false, qtbase ? null }: -assert (withQt5 -> qt5 != null); assert (!withQt5 -> qt4 != null); +with stdenv.lib; + +assert (withQt5 -> qtbase != null); assert (!withQt5 -> qt4 != null); stdenv.mkDerivation { name = "polkit-qt-1-0.112.0"; @@ -11,9 +14,9 @@ stdenv.mkDerivation { sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"; }; - nativeBuildInputs = [ cmake automoc4 pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt5) automoc4; - propagatedBuildInputs = [ polkit glib ] ++ (if withQt5 then [qt5.base] else [qt4]); + propagatedBuildInputs = [ polkit glib ] ++ [(if withQt5 then qtbase else qt4)]; meta = { description = "A Qt wrapper around PolKit"; diff --git a/pkgs/development/libraries/polkit-qt-1/old.nix b/pkgs/development/libraries/polkit-qt-1/old.nix new file mode 100644 index 000000000000..b887134e5b93 --- /dev/null +++ b/pkgs/development/libraries/polkit-qt-1/old.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, cmake, pkgconfig, polkit, automoc4, glib +, qt4 ? null, qt5 ? null, withQt5 ? false }: + +assert (withQt5 -> qt5 != null); assert (!withQt5 -> qt4 != null); + +stdenv.mkDerivation { + name = "polkit-qt-1-0.112.0"; + + src = fetchurl { + url = "mirror://kde/stable/apps/KDE4.x/admin/polkit-qt-1-0.112.0.tar.bz2"; + sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7"; + }; + + nativeBuildInputs = [ cmake automoc4 pkgconfig ]; + + propagatedBuildInputs = [ polkit glib ] ++ (if withQt5 then [qt5.base] else [qt4]); + + meta = { + description = "A Qt wrapper around PolKit"; + maintainers = with stdenv.lib.maintainers; [ ttuegel ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8cbc40c7ecdd..be9996e1d398 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7803,9 +7803,7 @@ let polkit_qt4 = callPackage ../development/libraries/polkit-qt-1 { }; - polkit_qt5 = callPackage ../development/libraries/polkit-qt-1 { - withQt5 = true; - }; + polkit_qt5 = callPackage ../development/libraries/polkit-qt-1/old.nix { withQt5 = true; }; policykit = callPackage ../development/libraries/policykit { }; @@ -7909,6 +7907,10 @@ let phonon_backend_vlc = callPackage ../development/libraries/phonon-backend-vlc/qt5 { }; + polkitQt = callPackage ../development/libraries/polkit-qt-1 { + withQt5 = true; + }; + }; qt55Libs = lib.makeScope qt55.newScope qt5LibsFun;