nixpkgs/pkgs/development/libraries/polkit-qt-1/default.nix

38 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, cmake, pkgconfig, polkit, automoc4, glib
2015-09-27 16:58:27 +02:00
, qt4 ? null
, withQt5 ? false, qtbase ? null }:
2015-09-27 16:58:27 +02:00
with stdenv.lib;
assert (withQt5 -> qtbase != null); assert (!withQt5 -> qt4 != null);
stdenv.mkDerivation {
name = "polkit-qt-1-0.112.0";
2016-04-19 03:29:19 +02:00
outputs = [ "dev" "out" ];
src = fetchurl {
url = "mirror://kde/stable/apps/KDE4.x/admin/polkit-qt-1-0.112.0.tar.bz2";
sha256 = "1ip78x20hjqvm08kxhp6gb8hf6k5n6sxyx6kk2yvvq53djzh7yv7";
};
2015-09-27 16:58:27 +02:00
nativeBuildInputs = [ cmake pkgconfig ] ++ optional (!withQt5) automoc4;
2015-09-27 16:58:27 +02:00
propagatedBuildInputs = [ polkit glib ] ++ [(if withQt5 then qtbase else qt4)];
2016-04-19 03:29:19 +02:00
preConfigure = ''
cmakeFlags+=" -DCMAKE_INSTALL_LIBDIR=''${!outputLib}/lib"
'';
postFixup = ''
# Fix library location in CMake module
sed -i "$dev/lib/cmake/PolkitQt5-1/PolkitQt5-1Config.cmake" \
-e "s,set_and_check.POLKITQT-1_LIB_DIR.*$,set_and_check(POLKITQT-1_LIB_DIR \"''${!outputLib}/lib\"),"
'';
meta = {
description = "A Qt wrapper around PolKit";
maintainers = with stdenv.lib.maintainers; [ ttuegel ];
};
}