1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00
nixpkgs/pkgs/games/blackshadeselite/default.nix
Lluís Batlle i Rossell bda2b3ca5a blackshadeselite: fix build in gcc 4.6
I simply added '-fpermissive', and it went on.
2012-07-02 21:40:14 +02:00

39 lines
1.1 KiB
Nix

{stdenv, fetchsvn, SDL, mesa, openal, libvorbis, freealut, SDL_image, popt}:
stdenv.mkDerivation rec {
name = "blackshades-elite-svn-29";
src = fetchsvn {
url = svn://svn.gna.org/svn/blackshadeselite/trunk;
rev = 29;
sha256 = "1lkws5pqpgcgdlar11waikp6y41z678457n9jcik7nhn53cjjr1s";
};
NIX_LDFLAGS = "-lSDL_image";
NIX_CFLAGS_COMPILE = "-fpermissive";
buildInputs = [ SDL SDL_image mesa openal libvorbis freealut popt ];
patchPhase = ''
sed -i -e s,Data/,$out/opt/$name/Data/,g \
-e s,Data:,$out/opt/$name/Data/,g \
Source/*.cpp
sed -i -e s/-march=pentium-m// Makefile
sed -i -e '/include "Window.h"/a#include <cstring>' -e 's/strcmp/std::strcmp/' \
Source/Window.cpp
'';
installPhase = ''
mkdir -p $out/bin $out/opt/$name
cp objs/blackshades $out/bin/blackshadeselite
cp -R Data IF* Readme $out/opt/$name/
'';
meta = {
homepage = http://home.gna.org/blackshadeselite/;
description = "Fork of Black Shades";
license = "GPLv2+"; # Says its gna.org project page
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
}