3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/sdlmame/default.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2013-10-12 01:31:46 +01:00
{ stdenv, fetchurl, alsaLib, qt48, SDL, fontconfig, freetype, SDL_ttf, xlibs }:
2013-10-27 11:34:30 +00:00
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
2013-10-12 01:31:46 +01:00
stdenv.mkDerivation rec {
2013-11-11 00:44:11 +00:00
version = "0.151.u0-1";
2013-10-12 01:31:46 +01:00
name = "sdlmame-${version}";
src = if stdenv.system == "x86_64-linux"
then fetchurl {
url = "ftp://ftp.archlinux.org/community/os/x86_64/${name}-x86_64.pkg.tar.xz";
2013-11-11 00:44:11 +00:00
sha256 = "1j9vjxhrhsskrlk5wr7al4wk2hh3983kcva42mqal09bmc8qg3m9";
2013-10-12 01:31:46 +01:00
}
else fetchurl {
url = "ftp://ftp.archlinux.org/community/os/i686/${name}-i686.pkg.tar.xz";
2013-11-11 00:44:11 +00:00
sha256 = "1i38j9ml66pyxzm0zzf1fv4lb40f6w47cdgaw846q91pzakkkqn7";
2013-10-12 01:31:46 +01:00
};
buildPhase = ''
sed -i "s|/usr|$out|" bin/sdlmame
'';
installPhase = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${alsaLib}/lib:${qt48}/lib:${SDL}/lib:${fontconfig}/lib:${freetype}/lib:${SDL_ttf}/lib:${xlibs.libX11}/lib:${xlibs.libXinerama}/lib:${stdenv.cc.cc}/lib" \
2013-10-12 01:31:46 +01: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 13:20:43 +00:00
description = "A port of the popular Multiple Arcade Machine Emulator using SDL with OpenGL support";
2013-10-12 01:31:46 +01:00
license = "MAME";
maintainers = with maintainers; [ lovek323 ];
platforms = platforms.linux;
};
}