summary refs log tree commit diff
path: root/pkgs/desktops/deepin/dde-calendar/default.nix
blob: e148df51a875fb75b5d7a745f8d173111078222c (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
{ stdenv, mkDerivation, fetchFromGitHub, pkgconfig, cmake, qttools,
  deepin-gettext-tools, dtkcore, dtkwidget, deepin
}:

mkDerivation rec {
  pname = "dde-calendar";
  version = "5.0.1";

  src = fetchFromGitHub {
    owner = "linuxdeepin";
    repo = pname;
    rev = version;
    sha256 = "1zzr3crkz4l5l135y0m53vqhv7fkrbvbspk8295swz9gsm3f7ah9";
  };

  nativeBuildInputs = [
    cmake
    pkgconfig
    qttools
    deepin-gettext-tools
    deepin.setupHook
  ];

  buildInputs = [
    dtkcore
    dtkwidget
  ];

  postPatch = ''
    searchHardCodedPaths
    patchShebangs translate_generation.sh
    patchShebangs translate_desktop.sh

    fixPath $out /usr com.deepin.Calendar.service

    sed -i translate_desktop.sh \
      -e "s,/usr/bin/deepin-desktop-ts-convert,deepin-desktop-ts-convert,"
  '';

  passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };

  meta = with stdenv.lib; {
    description = "Calendar for Deepin Desktop Environment";
    homepage = "https://github.com/linuxdeepin/dde-calendar";
    license = licenses.gpl3;
    platforms = platforms.linux;
    maintainers = with maintainers; [ romildo ];
  };
}