summary refs log tree commit diff
path: root/pkgs/games/stepmania/default.nix
blob: 6a54dd7512f635c9b2b3fcfb1fde287d1f721e0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchhg, zlib, bzip2, pkgconfig, alsaLib, pulseaudio, libmad, libtheora,
  libvorbis, libpng, libjpeg, mesa, gtk, ffmpeg, automake, autoconf, glew }:

stdenv.mkDerivation rec {
  name = "stepmania-5";

  src = fetchhg {
    url = "https://code.google.com/p/sm-ssc/";
    # revision = "5fdf515a180e";
    sha256 = "05v19giq7d956islr2r8350zfwc4h8sq89xlj93ccii8rp94cvvf";
  };

  buildInputs = [ zlib bzip2 pkgconfig alsaLib pulseaudio libmad libtheora
                  libvorbis libpng libjpeg mesa gtk ffmpeg automake autoconf glew ];

  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
    chmod +x $out/bin/stepmania
  '';

  meta = with stdenv.lib; {
      platforms = platforms.linux;
      maintainers = maintainers.mornfall;
  };
}