nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 pkg-config,
6 cmake,
7 libvorbis,
8 libeb,
9 hunspell,
10 opencc,
11 xapian,
12 libzim,
13 lzo,
14 xz,
15 tomlplusplus,
16 fmt,
17 bzip2,
18 libiconv,
19 libXtst,
20 qtbase,
21 qtsvg,
22 qtwebengine,
23 qttools,
24 qtwayland,
25 qt5compat,
26 qtmultimedia,
27 wrapQtAppsHook,
28 wrapGAppsHook3,
29}:
30
31stdenv.mkDerivation {
32 pname = "goldendict-ng";
33 version = "25.05.0";
34
35 src = fetchFromGitHub {
36 owner = "xiaoyifang";
37 repo = "goldendict-ng";
38 tag = "v25.05.0-Release.2a2b0e16";
39 hash = "sha256-PBqkVac867xE4ZcvwTysAK6rQSoEZelKrV9USvFsaLk=";
40 };
41
42 nativeBuildInputs = [
43 pkg-config
44 cmake
45 wrapQtAppsHook
46 wrapGAppsHook3
47 ];
48 buildInputs = [
49 qtbase
50 qtsvg
51 qttools
52 qtwebengine
53 qt5compat
54 qtmultimedia
55 qtwayland
56 libvorbis
57 tomlplusplus
58 fmt
59 hunspell
60 xz
61 lzo
62 libXtst
63 bzip2
64 libiconv
65 opencc
66 libeb
67 xapian
68 libzim
69 ];
70
71 # to prevent double wrapping of wrapQtApps and wrapGApps
72 dontWrapGApps = true;
73
74 preFixup = ''
75 qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
76 '';
77
78 cmakeFlags = [
79 "-DWITH_XAPIAN=ON"
80 "-DWITH_ZIM=ON"
81 "-DWITH_FFMPEG_PLAYER=OFF"
82 "-DWITH_EPWING_SUPPORT=ON"
83 "-DUSE_SYSTEM_FMT=ON"
84 "-DUSE_SYSTEM_TOML=ON"
85 ];
86
87 meta = with lib; {
88 homepage = "https://xiaoyifang.github.io/goldendict-ng/";
89 description = "Advanced multi-dictionary lookup program";
90 platforms = platforms.linux;
91 mainProgram = "goldendict";
92 maintainers = with maintainers; [
93 slbtty
94 michojel
95 linsui
96 ];
97 license = licenses.gpl3Plus;
98 };
99}