@@ -1,35 +1,27 @@
1−{stdenv, fetchurl, which, pkgconfig, SDL, gtk2, mesa, SDL_ttf}:
1+{stdenv, lib, fetchurl, boost, dash, freetype, libpng, pkgconfig, SDL, which, zlib }:
2+
3+stdenv.mkDerivation rec {
4+ name = "mupen64plus-${version}";
5+ version = "2.5";
26
3−stdenv.mkDerivation {
4− name = "mupen64plus-1.5";
57 src = fetchurl {
6− url = http://mupen64plus.googlecode.com/files/Mupen64Plus-1-5-src.tar.gz;
7− sha256 = "0gygfgyr2sg4yx77ijk133d1ra0v1yxi4xjxrg6kp3zdjmhdmcjq";
8+ url = "https://github.com/mupen64plus/mupen64plus-core/releases/download/${version}/mupen64plus-bundle-src-${version}.tar.gz";
9+ sha256 = "0rmsvfn4zfvbhz6gf1xkb7hnwflv6sbklwjz2xk4dlpj4vcbjxcw";
810 };
911
10− buildInputs = [ which pkgconfig SDL gtk2 mesa SDL_ttf ];
11−
12− hardeningDisable = [ "format" ];
13−
14− preConfigure = ''
15− # Some C++ incompatibility fixes
16− sed -i -e 's|char \* extstr = strstr|const char * extstr = strstr|' glide64/Main.cpp
17− sed -i -e 's|char \* extstr = strstr|const char * extstr = strstr|' glide64/Combine.cpp
12+ buildInputs = [ boost dash freetype libpng pkgconfig SDL which zlib ];
1813
19− # Fix some hardcoded paths
20− sed -i -e "s|/usr/local|$out|g" main/main.c
21−
22− # Remove PATH environment variable from install script
23− sed -i -e "s|export PATH=|#export PATH=|" ./install.sh
14+ buildPhase = ''
15+ dash m64p_build.sh PREFIX="$out" COREDIR="$out/lib/" PLUGINDIR="$out/lib/mupen64plus" SHAREDIR="$out/share/mupen64plus"
16+ '';
17+ installPhase = ''
18+ dash m64p_install.sh DESTDIR="$out" PREFIX=""
2419 '';
25−
26− buildPhase = "make all";
27− installPhase = "PREFIX=$out make install";
2820
2921 meta = {
3022 description = "A Nintendo 64 Emulator";
3123 license = stdenv.lib.licenses.gpl2Plus;
32− homepage = http://code.google.com/p/mupen64plus;
24+ homepage = http://www.mupen64plus.org/;
3325 maintainers = [ stdenv.lib.maintainers.sander ];
3426 platforms = stdenv.lib.platforms.linux;
3527 };