summary refs log tree commit diff
path: root/pkgs/applications/terminal-emulators/kgx/default.nix
blob: dc5c651d50a59a5f7c22b44223d65d2d03857315 (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
74
75
76
{ lib
, stdenv
, genericBranding ? false
, fetchFromGitLab
, gettext
, gnome
, libgtop
, gtk3
, libhandy
, pcre2
, vte
, appstream-glib
, desktop-file-utils
, git
, meson
, ninja
, pkg-config
, python3
, sassc
, wrapGAppsHook
}:

stdenv.mkDerivation {
  pname = "kgx";
  version = "unstable-2021-03-13";

  src = fetchFromGitLab {
    domain = "gitlab.gnome.org";
    owner = "ZanderBrown";
    repo = "kgx";
    rev = "105adb6a8d09418a3ce622442aef6ae623dee787";
    sha256 = "0m34y0nbcfkyicb40iv0iqaq6f9r3f66w43lr803j3351nxqvcz2";
  };

  buildInputs = [
    gettext
    libgtop
    gnome.nautilus
    gtk3
    libhandy
    pcre2
    vte
  ];

  nativeBuildInputs = [
    appstream-glib
    desktop-file-utils
    git
    meson
    ninja
    pkg-config
    python3
    sassc
    wrapGAppsHook
  ];

  mesonFlags = lib.optional genericBranding "-Dgeneric=true";

  postPatch = ''
    chmod +x build-aux/meson/postinstall.py
    patchShebangs build-aux/meson/postinstall.py
  '';

  preFixup = ''
    substituteInPlace $out/share/applications/org.gnome.zbrown.KingsCross.desktop \
      --replace "Exec=kgx" "Exec=$out/bin/kgx"
  '';

  meta = with lib; {
    description = "Simple user-friendly terminal emulator for the GNOME desktop";
    homepage = "https://gitlab.gnome.org/ZanderBrown/kgx";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ zhaofengli ];
    platforms = platforms.linux;
  };
}