2019-11-10 16:44:34 +00:00
|
|
|
{stdenv, fetchFromGitHub, nasm, SDL, zlib, libpng, ncurses, libGLU, libGL
|
2016-06-04 20:43:43 +00:00
|
|
|
, makeDesktopItem }:
|
2011-06-25 22:25:50 +00:00
|
|
|
|
2016-06-04 20:43:43 +00:00
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "zsnes";
|
|
|
|
exec = "zsnes";
|
|
|
|
icon = "zsnes";
|
|
|
|
comment = "A SNES emulator";
|
|
|
|
desktopName = "zsnes";
|
|
|
|
genericName = "zsnes";
|
|
|
|
categories = "Game;";
|
|
|
|
};
|
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2011-06-25 22:25:50 +00:00
|
|
|
name = "zsnes-1.51";
|
2013-10-09 06:15:39 +00:00
|
|
|
|
2016-10-07 22:39:40 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "emillon";
|
|
|
|
repo = "zsnes";
|
|
|
|
rev = "fc160b2538738995f600f8405d23a66b070dac02";
|
|
|
|
sha256 = "1gy79d5wdaacph0cc1amw7mqm7i0716n6mvav16p1svi26iz193v";
|
2011-06-25 22:25:50 +00:00
|
|
|
};
|
|
|
|
|
2019-11-10 16:44:34 +00:00
|
|
|
buildInputs = [ nasm SDL zlib libpng ncurses libGLU libGL ];
|
2014-01-02 23:54:13 +00:00
|
|
|
|
2016-10-07 22:39:40 +00:00
|
|
|
prePatch = ''
|
|
|
|
for i in $(cat debian/patches/series); do
|
|
|
|
echo "applying $i"
|
|
|
|
patch -p1 < "debian/patches/$i"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2011-06-25 22:25:50 +00:00
|
|
|
preConfigure = ''
|
|
|
|
cd src
|
2014-01-02 23:54:13 +00:00
|
|
|
sed -i "/^STRIP/d" configure
|
2017-08-05 14:39:48 +00:00
|
|
|
sed -i "/\$STRIP/d" configure
|
2011-06-25 22:25:50 +00:00
|
|
|
'';
|
2013-10-09 06:15:39 +00:00
|
|
|
|
2015-07-10 10:42:39 +00:00
|
|
|
configureFlags = [ "--enable-release" ];
|
2013-10-09 06:15:39 +00:00
|
|
|
|
2016-06-04 20:43:43 +00:00
|
|
|
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/
|
|
|
|
'';
|
|
|
|
|
2011-06-25 22:25:50 +00:00
|
|
|
meta = {
|
|
|
|
description = "A Super Nintendo Entertainment System Emulator";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2011-07-22 19:25:31 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.sander ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://www.zsnes.com";
|
2017-09-10 12:19:11 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
2011-06-25 22:25:50 +00:00
|
|
|
};
|
2014-01-02 23:54:13 +00:00
|
|
|
}
|