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