about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/deepin/core/dde-clipboard/default.nix
blob: 47ec1c837b13570240b751eee22fd55ab3a26cf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ stdenv
, lib
, fetchFromGitHub
, dtkwidget
, qt5integration
, qt5platform-plugins
, dde-qt-dbus-factory
, gio-qt
, cmake
, qttools
, kwayland
, pkg-config
, wrapQtAppsHook
, glibmm
, gtest
}:

stdenv.mkDerivation rec {
  pname = "dde-clipboard";
  version = "5.4.25";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "sha256-oFATOBXf4NvGxjVMlfxwfQkBffeKut8ao+X6T9twb/I=";
  };

  postPatch = ''
    substituteInPlace CMakeLists.txt \
      --replace "/etc/xdg" "$out/etc/xdg" \
      --replace "/lib/systemd/user" "$out/lib/systemd/user" \
      --replace "/usr/share" "$out/share"

    substituteInPlace misc/com.deepin.dde.Clipboard.service \
      --replace "/usr/bin/qdbus" "${lib.getBin qttools}/bin/qdbus"

    substituteInPlace misc/{dde-clipboard.desktop,dde-clipboard-daemon.service,com.deepin.dde.Clipboard.service} \
      --replace "/usr" "$out"

    patchShebangs translate_generation.sh generate_gtest_report.sh
  '';

  nativeBuildInputs = [
    cmake
    pkg-config
    qttools
    wrapQtAppsHook
  ];

  buildInputs = [
    dtkwidget
    qt5integration
    qt5platform-plugins
    dde-qt-dbus-factory
    gio-qt
    kwayland
    glibmm
    gtest
  ];

  cmakeFlags = [
    "-DUSE_DEEPIN_WAYLAND=OFF"
  ];

  meta = with lib; {
    description = "DDE optional clipboard manager componment";
    homepage = "https://github.com/linuxdeepin/dde-clipboard";
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = teams.deepin.members;
  };
}