diff --git a/pkgs/games/stepmania/default.nix b/pkgs/games/stepmania/default.nix index 2379ac9ecd4e..82cffc8dec6f 100644 --- a/pkgs/games/stepmania/default.nix +++ b/pkgs/games/stepmania/default.nix @@ -1,26 +1,35 @@ -{ stdenv, fetchhg, zlib, bzip2, pkgconfig, alsaLib, pulseaudio, libmad, libtheora, - libvorbis, libpng, libjpeg, mesa, gtk, ffmpeg, automake, autoconf, glew }: +{ fetchFromGitHub, stdenv, pkgconfig, autoconf, automake, yasm, zlib, bzip2, alsaLib +, pulseaudio, libmad, libtheora, libvorbis, libpng, libjpeg, gtk +, mesa, glew }: stdenv.mkDerivation rec { - name = "stepmania-5"; + name = "stepmania-${version}"; + version = "5.0.7"; - src = fetchhg { - url = "https://code.google.com/p/sm-ssc/"; - # revision = "5fdf515a180e"; - sha256 = "05v19giq7d956islr2r8350zfwc4h8sq89xlj93ccii8rp94cvvf"; + src = fetchFromGitHub { + owner = "stepmania"; + repo = "stepmania"; + rev = "v${version}"; + sha256 = "1lagnk8x72v5jazcbb39237fi33kp5zgg22fxw7zmvr4qwqiqbz9"; }; - buildInputs = [ zlib bzip2 pkgconfig alsaLib pulseaudio libmad libtheora - libvorbis libpng libjpeg mesa gtk ffmpeg automake autoconf glew ]; + buildInputs = [ + pkgconfig autoconf automake yasm zlib bzip2 alsaLib pulseaudio libmad libtheora + libvorbis libpng libjpeg gtk mesa glew + ]; + + preConfigure = '' + substituteInPlace autoconf/m4/video.m4 \ + --replace './configure $FFMPEG_CONFFLAGS' './configure --prefix='$out' $FFMPEG_CONFFLAGS' + + ./autogen.sh + ''; - preConfigure = "./autogen.sh"; postInstall = '' - mv "$out/stepmania 5/"* $out/ - rmdir "$out/stepmania 5" mkdir -p $out/bin - echo "#\!/bin/sh" > $out/bin/stepmania - echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${alsaLib}/lib' >> $out/bin/stepmania - echo "exec $out/stepmania" >> $out/bin/stepmania + echo "#!/bin/sh" > $out/bin/stepmania + echo "export LD_LIBRARY_PATH=$out/stepmania-5.0:${alsaLib}/lib:\$LD_LIBRARY_PATH" >> $out/bin/stepmania + echo "exec $out/stepmania-5.0/stepmania" >> $out/bin/stepmania chmod +x $out/bin/stepmania '';