depot/third_party/nixpkgs/pkgs/desktops/deepin/library/dtkwidget/default.nix
Default email c7e6337bd0 Project import generated by Copybara.
GitOrigin-RevId: 08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b
2023-04-29 12:46:19 -04:00

80 lines
1.7 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, qttools
, doxygen
, wrapQtAppsHook
, dtkgui
, qtbase
, qtmultimedia
, qtsvg
, qtx11extras
, cups
, gsettings-qt
, libstartup_notification
, xorg
}:
stdenv.mkDerivation rec {
pname = "dtkwidget";
version = "5.6.10";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-PhVK/lUFrDW1bn9lUhLuKWLAVj7E7+/YC5USShrg3ds=";
};
postPatch = ''
substituteInPlace src/widgets/dapplication.cpp \
--replace "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \
"auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation) << \"$out/share\";"
'';
nativeBuildInputs = [
cmake
qttools
doxygen
pkg-config
wrapQtAppsHook
];
buildInputs = [
qtbase
qtmultimedia
qtsvg
qtx11extras
cups
gsettings-qt
libstartup_notification
xorg.libXdmcp
];
propagatedBuildInputs = [ dtkgui ];
cmakeFlags = [
"-DDVERSION=${version}"
"-DBUILD_DOCS=ON"
"-DQCH_INSTALL_DESTINATION=${qtbase.qtDocPrefix}"
"-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
];
preConfigure = ''
# qt.qpa.plugin: Could not find the Qt platform plugin "minimal"
# A workaround is to set QT_PLUGIN_PATH explicitly
export QT_PLUGIN_PATH=${qtbase.bin}/${qtbase.qtPluginPrefix}
'';
meta = with lib; {
description = "Deepin graphical user interface library";
homepage = "https://github.com/linuxdeepin/dtkwidget";
license = licenses.lgpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}