nixpkgs/pkgs/applications/misc/sdcv/default.nix
Franz Pletz aff1f4ab94 Use general hardening flag toggle lists
The following parameters are now available:

  * hardeningDisable
    To disable specific hardening flags
  * hardeningEnable
    To enable specific hardening flags

Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.

cc-wrapper supports the following flags:

  * fortify
  * stackprotector
  * pie (disabled by default)
  * pic
  * strictoverflow
  * format
  * relro
  * bindnow
2016-03-05 18:55:26 +01:00

35 lines
928 B
Nix

{ 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;
platforms = stdenv.lib.platforms.unix;
};
src = fetchurl {
url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
};
hardeningDisable = [ "format" ];
patches = ( if stdenv.isDarwin
then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
else [ ./sdcv.cpp.patch ] );
buildInputs = [ pkgconfig glib gettext ];
preBuild = ''
sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
'';
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
}