aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/desktops/deepin/deepin-terminal/default.nix
blob: ae312137942780ccbfe83d5707026e1ff87918a7 (plain)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{ stdenv
, fetchFromGitHub
, pkgconfig
, cmake
, ninja
, vala_0_40
, fetchpatch
, gettext
, at-spi2-core
, dbus
, epoxy
, expect
, gtk3
, json-glib
, libXdmcp
, libgee
, libpthreadstubs
, librsvg
, libsecret
, libtasn1
, libxcb
, libxkbcommon
, p11-kit
, pcre
, vte
, wnck
, libselinux
, gnutls
, pcre2
, libsepol
, utillinux
, deepin-menu
, deepin-shortcut-viewer
, deepin
, wrapGAppsHook
}:

stdenv.mkDerivation rec {
  pname = "deepin-terminal";
  version = "5.0.0";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = "deepin-terminal";
    rev = version;
    sha256 = "1929saj828b438d07caw3cjhqq60v6gni7mi3fqrg9wdjz81xwv7";
  };

  patches = [
    # Fix build with VTE 0.60
    (fetchpatch {
      url = "https://github.com/linuxdeepin/deepin-terminal/commit/542d1035b609698ee81aa7971d20ca8e5930743d.patch";
      sha256 = "1pihiy70yc25fm5fx7i7v9gmi65v4mhldvi7xwv8rgr2z6hbfj41";
    })
  ];

  nativeBuildInputs = [
    pkgconfig
    cmake
    ninja
    vala_0_40 # xcb.vapi:411.3-411.48: error: missing return statement at end of subroutine body
    gettext
    libselinux libsepol utillinux # required by gio
    deepin.setupHook
    wrapGAppsHook
  ];

  buildInputs = [
    at-spi2-core
    dbus
    deepin-menu
    deepin-shortcut-viewer
    epoxy
    expect
    gtk3
    json-glib
    libXdmcp
    libgee
    libpthreadstubs
    librsvg
    libsecret
    libtasn1
    libxcb
    libxkbcommon
    p11-kit
    pcre
    vte
    wnck
    gnutls
    pcre2
  ];

  postPatch = ''
    searchHardCodedPaths
  '';

  cmakeFlags = [
    "-DTEST_BUILD=OFF"
    "-DUSE_VENDOR_LIB=OFF"
    "-DVERSION=${version}"
  ];

  passthru.updateScript = deepin.updateScript { inherit pname version src; };

  meta = with stdenv.lib; {
    description = "Default terminal emulator for Deepin";
    longDescription = ''
      Deepin terminal, it sharpens your focus in the world of command line!
      It is an advanced terminal emulator with workspace, multiple
      windows, remote management, quake mode and other features.
    '';
    homepage = "https://github.com/linuxdeepin/deepin-terminal";
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = [ maintainers.romildo ];
  };
}