forked from mirrors/nixpkgs
0b21848e77
In ab70693 @viric says zsnes works better without stripping. But the build expression kept the $STRIP in the compiler options, so if it is set to something it will show up in there. For example: g++ -pipe -I. -I/usr/local/include -I/usr/include -D__UNIXSDL__ -I/nix/store/04qgmdpmalgsy92zgs2z896jx073hcn2-SDL-1.2.15-dev/include/SDL -I/nix/store/04qgmdpmalgsy92zgs2z896jx073hcn2-SDL-1.2.15-dev/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -DNCURSES -D__OPENGL__ -march=native -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr strip -D__RELEASE__ -fno-rtti -o tools/fileutil.o -c tools/fileutil.cpp g++: error: strip: No such file or directory This commit removes that reference to $STRIP too.
64 lines
1.5 KiB
Nix
64 lines
1.5 KiB
Nix
{stdenv, fetchFromGitHub, nasm, SDL, zlib, libpng, ncurses, mesa
|
|
, makeDesktopItem }:
|
|
|
|
let
|
|
desktopItem = makeDesktopItem {
|
|
name = "zsnes";
|
|
exec = "zsnes";
|
|
icon = "zsnes";
|
|
comment = "A SNES emulator";
|
|
desktopName = "zsnes";
|
|
genericName = "zsnes";
|
|
categories = "Game;";
|
|
};
|
|
|
|
in stdenv.mkDerivation {
|
|
name = "zsnes-1.51";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "emillon";
|
|
repo = "zsnes";
|
|
rev = "fc160b2538738995f600f8405d23a66b070dac02";
|
|
sha256 = "1gy79d5wdaacph0cc1amw7mqm7i0716n6mvav16p1svi26iz193v";
|
|
};
|
|
|
|
buildInputs = [ nasm SDL zlib libpng ncurses mesa ];
|
|
|
|
prePatch = ''
|
|
for i in $(cat debian/patches/series); do
|
|
echo "applying $i"
|
|
patch -p1 < "debian/patches/$i"
|
|
done
|
|
'';
|
|
|
|
preConfigure = ''
|
|
cd src
|
|
sed -i "/^STRIP/d" configure
|
|
sed -i "/\$STRIP/d" configure
|
|
'';
|
|
|
|
configureFlags = [ "--enable-release" ];
|
|
|
|
postInstall = ''
|
|
function installIcon () {
|
|
mkdir -p $out/share/icons/hicolor/$1/apps/
|
|
cp icons/$1x32.png $out/share/icons/hicolor/$1/apps/zsnes.png
|
|
}
|
|
installIcon "16x16"
|
|
installIcon "32x32"
|
|
installIcon "48x48"
|
|
installIcon "64x64"
|
|
|
|
mkdir -p $out/share/applications
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications/
|
|
'';
|
|
|
|
meta = {
|
|
description = "A Super Nintendo Entertainment System Emulator";
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
|
homepage = http://www.zsnes.com;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
};
|
|
}
|