From 0bdd362cd14b402415a8ddbc26e1813a94c0510f Mon Sep 17 00:00:00 2001 From: rewine Date: Sat, 7 Jan 2023 16:36:30 +0800 Subject: [PATCH] dtkwidget: init at 5.6.3 --- pkgs/desktops/deepin/default.nix | 1 + .../deepin/library/dtkwidget/default.nix | 67 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 pkgs/desktops/deepin/library/dtkwidget/default.nix diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index fe0f073a3ad3..a356e98d6444 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -8,6 +8,7 @@ let dtkcommon = callPackage ./library/dtkcommon { }; dtkcore = callPackage ./library/dtkcore { }; dtkgui = callPackage ./library/dtkgui { }; + dtkwidget = callPackage ./library/dtkwidget { }; }; in diff --git a/pkgs/desktops/deepin/library/dtkwidget/default.nix b/pkgs/desktops/deepin/library/dtkwidget/default.nix new file mode 100644 index 000000000000..170ae821eba2 --- /dev/null +++ b/pkgs/desktops/deepin/library/dtkwidget/default.nix @@ -0,0 +1,67 @@ +{ stdenv +, lib +, fetchFromGitHub +, dtkgui +, pkg-config +, cmake +, qttools +, qtmultimedia +, qtsvg +, qtx11extras +, wrapQtAppsHook +, cups +, gsettings-qt +, libstartup_notification +, xorg +}: + +stdenv.mkDerivation rec { + pname = "dtkwidget"; + version = "5.6.3"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = pname; + rev = version; + sha256 = "sha256-APk2p8pdLsaKvPp95HtEI1F1LM4ySUL+fhGsC5vHasU="; + }; + + postPatch = '' + substituteInPlace src/widgets/dapplication.cpp \ + --replace "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);" \ + "auto dataDirs = DStandardPaths::standardLocations(QStandardPaths::GenericDataLocation) << \"$out/share\";" + ''; + + nativeBuildInputs = [ + cmake + qttools + pkg-config + wrapQtAppsHook + ]; + + buildInputs = [ + qtmultimedia + qtsvg + qtx11extras + cups + gsettings-qt + libstartup_notification + xorg.libXdmcp + ]; + + propagatedBuildInputs = [ dtkgui ]; + + cmakeFlags = [ + "-DDVERSION=${version}" + "-DBUILD_DOCS=OFF" + "-DMKSPECS_INSTALL_DIR=${placeholder "out"}/mkspecs/modules" + ]; + + 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; + }; +}