2015-09-15 12:26:18 +03:00
|
|
|
{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xorg }:
|
2013-10-12 04:31:46 +04:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-11-11 04:44:11 +04:00
|
|
|
version = "0.151.u0-1";
|
2013-10-12 04:31:46 +04:00
|
|
|
name = "sdlmame-${version}";
|
|
|
|
|
2018-08-20 22:11:29 +03:00
|
|
|
src = if stdenv.hostPlatform.system == "x86_64-linux"
|
2013-10-12 04:31:46 +04:00
|
|
|
then fetchurl {
|
2016-03-21 06:01:58 +03:00
|
|
|
url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-x86_64.pkg.tar.xz";
|
2013-11-11 04:44:11 +04:00
|
|
|
sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
|
2013-10-12 04:31:46 +04:00
|
|
|
}
|
|
|
|
else fetchurl {
|
2016-03-21 06:01:58 +03:00
|
|
|
url = "http://seblu.net/a/archive/packages/s/sdlmame/${name}-i686.pkg.tar.xz";
|
2013-11-11 04:44:11 +04:00
|
|
|
sha256 = "1i38j9ml66pyxzm0zzf1fv4lb40f6w47cdgaw846q91pzakkkqn7";
|
2013-10-12 04:31:46 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
sed -i "s|/usr|$out|" bin/sdlmame
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
patchelf \
|
2014-12-17 21:11:30 +03:00
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2015-10-05 13:23:02 +03:00
|
|
|
--set-rpath "${stdenv.lib.makeLibraryPath [ alsaLib qt48 SDL fontconfig freetype SDL_ttf xorg.libX11 xorg.libXinerama stdenv.cc.cc ]}" \
|
2013-10-12 04:31:46 +04:00
|
|
|
share/sdlmame/sdlmame
|
|
|
|
|
|
|
|
mkdir -p "$out/bin"
|
|
|
|
cp -r bin/sdlmame "$out/bin"
|
|
|
|
cp -r share "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://sdlmame.lngn.net;
|
2014-11-11 16:20:43 +03:00
|
|
|
description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support";
|
2013-10-12 04:31:46 +04:00
|
|
|
license = "MAME";
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
2018-05-03 08:58:11 +03:00
|
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
2013-10-12 04:31:46 +04:00
|
|
|
};
|
|
|
|
}
|