Skip to content

Commit

Permalink
mupen64plus: 1.5 -> 2.5
Browse files Browse the repository at this point in the history
(cherry picked from commit f068f3f)
  • Loading branch information
Lassulus authored and Mic92 committed Sep 11, 2017
1 parent ebd90bf commit 773268e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 25 deletions.
36 changes: 14 additions & 22 deletions pkgs/misc/emulators/mupen64plus/default.nix
@@ -1,35 +1,27 @@
{stdenv, fetchurl, which, pkgconfig, SDL, gtk2, mesa, SDL_ttf}:
{stdenv, lib, fetchurl, boost, dash, freetype, libpng, pkgconfig, SDL, which, zlib }:

stdenv.mkDerivation rec {
name = "mupen64plus-${version}";
version = "2.5";

stdenv.mkDerivation {
name = "mupen64plus-1.5";
src = fetchurl {
url = http://mupen64plus.googlecode.com/files/Mupen64Plus-1-5-src.tar.gz;
sha256 = "0gygfgyr2sg4yx77ijk133d1ra0v1yxi4xjxrg6kp3zdjmhdmcjq";
url = "https://github.com/mupen64plus/mupen64plus-core/releases/download/${version}/mupen64plus-bundle-src-${version}.tar.gz";
sha256 = "0rmsvfn4zfvbhz6gf1xkb7hnwflv6sbklwjz2xk4dlpj4vcbjxcw";
};

buildInputs = [ which pkgconfig SDL gtk2 mesa SDL_ttf ];

hardeningDisable = [ "format" ];

preConfigure = ''
# Some C++ incompatibility fixes
sed -i -e 's|char \* extstr = strstr|const char * extstr = strstr|' glide64/Main.cpp
sed -i -e 's|char \* extstr = strstr|const char * extstr = strstr|' glide64/Combine.cpp
buildInputs = [ boost dash freetype libpng pkgconfig SDL which zlib ];

# Fix some hardcoded paths
sed -i -e "s|/usr/local|$out|g" main/main.c
# Remove PATH environment variable from install script
sed -i -e "s|export PATH=|#export PATH=|" ./install.sh
buildPhase = ''
dash m64p_build.sh PREFIX="$out" COREDIR="$out/lib/" PLUGINDIR="$out/lib/mupen64plus" SHAREDIR="$out/share/mupen64plus"
'';
installPhase = ''
dash m64p_install.sh DESTDIR="$out" PREFIX=""
'';

buildPhase = "make all";
installPhase = "PREFIX=$out make install";

meta = {
description = "A Nintendo 64 Emulator";
license = stdenv.lib.licenses.gpl2Plus;
homepage = http://code.google.com/p/mupen64plus;
homepage = http://www.mupen64plus.org/;
maintainers = [ stdenv.lib.maintainers.sander ];
platforms = stdenv.lib.platforms.linux;
};
Expand Down
4 changes: 1 addition & 3 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -18768,9 +18768,7 @@ with pkgs;

mongoc = callPackage ../development/libraries/mongoc { };

mupen64plus = callPackage ../misc/emulators/mupen64plus {
stdenv = overrideCC stdenv gcc49;
};
mupen64plus = callPackage ../misc/emulators/mupen64plus { };

mynewt-newt = callPackage ../tools/package-management/mynewt-newt { };

Expand Down

0 comments on commit 773268e

Please sign in to comment.