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
|
{ stdenv
, lib
, fetchFromGitHub
, pkg-config
, cmake
, libvorbis
, ffmpeg
, libeb
, hunspell
, opencc
, xapian
, libzim
, lzo
, xz
, tomlplusplus
, fmt
, bzip2
, libiconv
, libXtst
, qtbase
, qtsvg
, qtwebengine
, qttools
, qtwayland
, qt5compat
, qtmultimedia
, qtspeech
, wrapQtAppsHook
, wrapGAppsHook
}:
stdenv.mkDerivation (finalAttrs: {
pname = "goldendict-ng";
version = "24.01.22";
src = fetchFromGitHub {
owner = "xiaoyifang";
repo = "goldendict-ng";
rev = "v${finalAttrs.version}-LoongYear.3dddb3be";
hash = "sha256-+OiZEkhNV06fZXPXv9zDzgJS5M3isHlcOXee3p/ejpw=";
};
nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook wrapGAppsHook ];
buildInputs = [
qtbase
qtsvg
qttools
qtwebengine
qt5compat
qtmultimedia
qtspeech
qtwayland
libvorbis
tomlplusplus
fmt
hunspell
xz
lzo
libXtst
bzip2
libiconv
opencc
libeb
ffmpeg
xapian
libzim
];
# to prevent double wrapping of wrapQtApps and wrapGApps
dontWrapGApps = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
cmakeFlags = [
"-DWITH_XAPIAN=ON"
"-DWITH_ZIM=ON"
"-DWITH_FFMPEG_PLAYER=ON"
"-DWITH_EPWING_SUPPORT=ON"
"-DUSE_SYSTEM_FMT=ON"
"-DUSE_SYSTEM_TOML=ON"
];
meta = with lib; {
homepage = "https://xiaoyifang.github.io/goldendict-ng/";
description = "An advanced multi-dictionary lookup program";
platforms = platforms.linux;
mainProgram = "goldendict";
maintainers = with maintainers; [ slbtty michojel ];
license = licenses.gpl3Plus;
};
})
|