2021-01-17 02:09:27 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
cmake,
|
|
|
|
pkg-config,
|
|
|
|
glib,
|
|
|
|
gettext,
|
|
|
|
readline,
|
|
|
|
}:
|
2013-06-02 01:21:30 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sdcv";
|
2023-05-03 03:04:17 +00:00
|
|
|
version = "0.5.5";
|
2017-11-10 18:04:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Dushistov";
|
|
|
|
repo = "sdcv";
|
|
|
|
rev = "v${version}";
|
2023-05-03 03:04:17 +00:00
|
|
|
sha256 = "sha256-EyvljVXhOsdxIYOGTzD+T16nvW7/RNx3DuQ2OdhjXJ4=";
|
2013-06-02 01:21:30 +00:00
|
|
|
};
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2017-11-10 18:04:00 +00:00
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gettext
|
|
|
|
readline
|
|
|
|
];
|
2016-02-12 18:27:08 +00:00
|
|
|
|
2024-10-07 02:05:03 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/Dushistov/sdcv/pull/104
|
|
|
|
substituteInPlace src/stardict_lib.cpp --replace-fail \
|
|
|
|
"gchar *nextchar = g_utf8_next_char(sWord)" \
|
|
|
|
"gchar *nextchar = const_cast<gchar*>(g_utf8_next_char(sWord))"
|
|
|
|
'';
|
|
|
|
|
2017-11-10 18:04:00 +00:00
|
|
|
preInstall = ''
|
2017-11-18 21:45:31 +00:00
|
|
|
mkdir locale
|
2013-06-02 01:21:30 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
|
2013-06-02 01:21:30 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://dushistov.github.io/sdcv/";
|
2017-11-10 18:04:00 +00:00
|
|
|
description = "Console version of StarDict";
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
license = licenses.gpl2;
|
2017-11-18 21:45:31 +00:00
|
|
|
platforms = platforms.unix;
|
2024-02-11 02:19:15 +00:00
|
|
|
mainProgram = "sdcv";
|
2017-11-10 18:04:00 +00:00
|
|
|
};
|
|
|
|
}
|