2023-08-04 22:07:22 +00:00
|
|
|
{ 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
|
2023-08-10 07:59:29 +00:00
|
|
|
, wrapGAppsHook
|
2023-08-04 22:07:22 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "goldendict-ng";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "23.09.10";
|
2023-08-04 22:07:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xiaoyifang";
|
|
|
|
repo = "goldendict-ng";
|
2023-10-09 19:29:22 +00:00
|
|
|
rev = "v${finalAttrs.version}-WhiteDew.54c8bd56";
|
|
|
|
hash = "sha256-X9xqodCqHjppz1zIHLnb87NiDE4FWlXiQufhDu/rJq4=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake wrapQtAppsHook wrapGAppsHook ];
|
2023-08-04 22:07:22 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qttools
|
|
|
|
qtwebengine
|
|
|
|
qt5compat
|
|
|
|
qtmultimedia
|
|
|
|
qtspeech
|
|
|
|
libvorbis
|
|
|
|
tomlplusplus
|
|
|
|
fmt
|
|
|
|
hunspell
|
|
|
|
xz
|
|
|
|
lzo
|
|
|
|
libXtst
|
|
|
|
bzip2
|
|
|
|
libiconv
|
|
|
|
opencc
|
|
|
|
libeb
|
|
|
|
ffmpeg
|
|
|
|
xapian
|
|
|
|
libzim
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
# to prevent double wrapping of wrapQtApps and wrapGApps
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
|
|
|
'';
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
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/";
|
2023-10-09 19:29:22 +00:00
|
|
|
description = "An advanced multi-dictionary lookup program";
|
2023-08-04 22:07:22 +00:00
|
|
|
platforms = platforms.linux;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "goldendict";
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ slbtty ];
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
};
|
|
|
|
})
|