aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/applications/networking/mailreaders/trojita/default.nix
blob: 52d4d77a4009115c70a7e9fe0419857cf535ee62 (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
{ akonadi-contacts
, cmake
, fetchgit
, fetchsvn
, gnupg
, gpgme
, kcontacts
, kf5gpgmepp
, lib
, libsecret
, mimetic
, mkDerivation
, pkgconfig
, qgpgme
, qtbase
, qtkeychain
, qttools
, qtwebkit
, qttranslations
, substituteAll
, withI18n ? true
}:

mkDerivation rec {
  pname = "trojita";
  version = "unstable-2020-07-06";

  src = fetchgit {
    url = "https://anongit.kde.org/trojita.git";
    rev = "e973a5169f18ca862ceb8ad749c93cd621d86e14";
    sha256 = "0r8nmlqwgsqkk0k8xh32fkwvv6iylj35xq2h8b7l3g03yc342kbn";
  };

  l10n = fetchsvn {
    url = "svn://anonsvn.kde.org/home/kde/trunk/l10n-kf5";
    rev = "1566642";
    sha256 = "0y45fjib153za085la3hqpryycx33dkj3cz8kwzn2w31kvldfl1q";
  };

  patches = (substituteAll {
    # See https://github.com/NixOS/nixpkgs/issues/86054
    src = ./fix-qttranslations-path.patch;
    inherit qttranslations;
  });

  buildInputs = [
    akonadi-contacts
    gpgme
    kcontacts
    libsecret
    mimetic
    qgpgme
    qtbase
    qtkeychain
    qtwebkit
    mimetic
    kf5gpgmepp
  ];

  nativeBuildInputs = [
    cmake
    pkgconfig
    qttools
    gnupg
  ];

  postPatch = "echo ${version} > src/trojita-version"
    + lib.optionalString withI18n ''
    mkdir -p po
    for f in `find ${l10n} -name "trojita_common.po"`; do
      cp $f po/trojita_common_$(echo $f | cut -d/ -f5).po
    done
  '';

  meta = with lib; {
    description = "A Qt IMAP e-mail client";
    homepage = "http://trojita.flaska.net/";
    license = with licenses; [ gpl2 gpl3 ];
    maintainers = with maintainers; [ ehmry ];
    platforms = platforms.linux;
  };

}