1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 02:24:27 +00:00
nixpkgs/pkgs/misc/emulators/nestopia/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

42 lines
1.2 KiB
Nix

{ stdenv, fetchurl, pkgconfig, SDL2, alsaLib, gtk3, mesa_glu, makeWrapper
, mesa, libarchive, libao, unzip, xdg_utils, gsettings_desktop_schemas }:
stdenv.mkDerivation rec {
name = "nestopia-1.46.2";
src = fetchurl {
url = https://github.com/rdanbrook/nestopia/archive/1.46.2.tar.gz;
sha256 = "07h49xwvg61dx20rk5p4r3ax2ar5y0ppvm60cqwqljyi9rdfbh7p";
};
# nondeterministic failures when creating directories
enableParallelBuilding = false;
hardeningDisable = [ "format" ];
buildInputs = [ pkgconfig SDL2 alsaLib gtk3 mesa_glu mesa makeWrapper
libarchive libao unzip xdg_utils gsettings_desktop_schemas ];
installPhase = ''
mkdir -p $out/{bin,share/nestopia}
make install PREFIX=$out
'';
preFixup = ''
for f in $out/bin/*; do
wrapProgram $f \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
done
'';
patches = [ ./build-fix.patch ];
meta = {
homepage = http://0ldsk00l.ca/nestopia/;
description = "NES emulator with a focus on accuracy";
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ MP2E ];
};
}