nixpkgs/pkgs/by-name/sd/sdcv/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.1 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
glib,
gettext,
readline,
}:
2013-06-02 01:21:30 +00:00
stdenv.mkDerivation rec {
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
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [
cmake
pkg-config
];
2017-11-10 18:04:00 +00:00
buildInputs = [
glib
gettext
readline
];
2016-02-12 18:27:08 +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
'';
env.NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__";
2013-06-02 01:21:30 +00:00
meta = with lib; {
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
};
}