2023-02-02 18:25:31 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
2023-04-29 16:46:19 +00:00
|
|
|
, pkg-config
|
2023-02-02 18:25:31 +00:00
|
|
|
, qttools
|
2023-04-29 16:46:19 +00:00
|
|
|
, doxygen
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, dtkgui
|
|
|
|
, qtbase
|
2023-02-02 18:25:31 +00:00
|
|
|
, qtmultimedia
|
|
|
|
, qtsvg
|
|
|
|
, qtx11extras
|
|
|
|
, cups
|
|
|
|
, gsettings-qt
|
|
|
|
, libstartup_notification
|
|
|
|
, xorg
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dtkwidget";
|
2024-07-01 15:47:52 +00:00
|
|
|
version = "5.6.29";
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxdeepin";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2024-07-01 15:47:52 +00:00
|
|
|
hash = "sha256-eFEigOJGw5gTi0G13/rtnqoaeTdnO0aSLfZlRwHg3yE=";
|
2023-02-02 18:25:31 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
patches = [
|
|
|
|
./fix-pkgconfig-path.patch
|
|
|
|
./fix-pri-path.patch
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/widgets/dapplication.cpp \
|
|
|
|
--replace "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \
|
|
|
|
"auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation) << \"$out/share\";"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
qttools
|
2023-04-29 16:46:19 +00:00
|
|
|
doxygen
|
2023-02-02 18:25:31 +00:00
|
|
|
pkg-config
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
qtbase
|
2023-02-02 18:25:31 +00:00
|
|
|
qtmultimedia
|
|
|
|
qtsvg
|
|
|
|
qtx11extras
|
|
|
|
cups
|
|
|
|
gsettings-qt
|
|
|
|
libstartup_notification
|
|
|
|
xorg.libXdmcp
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ dtkgui ];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"-DDTK_VERSION=${version}"
|
2023-04-29 16:46:19 +00:00
|
|
|
"-DBUILD_DOCS=ON"
|
2024-01-02 11:29:13 +00:00
|
|
|
"-DMKSPECS_INSTALL_DIR=${placeholder "dev"}/mkspecs/modules"
|
|
|
|
"-DQCH_INSTALL_DESTINATION=${placeholder "doc"}/${qtbase.qtDocPrefix}"
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
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}
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
outputs = [ "out" "dev" "doc" ];
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
postFixup = ''
|
|
|
|
for binary in $out/lib/dtk5/DWidget/bin/*; do
|
|
|
|
wrapQtApp $binary
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|