2013-06-02 03:21:30 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, glib, gettext }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name= "sdcv-0.4.2";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://sdcv.sourceforge.net/;
|
|
|
|
description = "Console version of StarDict program";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2016-09-01 19:39:33 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2013-06-02 03:21:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
|
|
|
|
sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
|
|
|
|
};
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 19:27:08 +01:00
|
|
|
|
2013-06-02 03:21:30 +02:00
|
|
|
patches = ( if stdenv.isDarwin
|
|
|
|
then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
|
|
|
|
else [ ./sdcv.cpp.patch ] );
|
|
|
|
|
2017-09-05 23:26:13 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
buildInputs = [ glib gettext ];
|
2013-06-02 03:21:30 +02:00
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
|
|
|
|
'';
|
|
|
|
|
2013-07-13 23:30:18 +02:00
|
|
|
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
|
|
|
|
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
|
2013-06-02 03:21:30 +02:00
|
|
|
}
|
|
|
|
|