1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 04:48:10 +00:00
nixpkgs/pkgs/games/the-powder-toy/default.nix
2016-11-24 01:17:52 +03:00

40 lines
963 B
Nix

{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat, zlib, bzip2 }:
stdenv.mkDerivation rec {
name = "the-powder-toy-${version}";
version = "91.5.330";
src = fetchFromGitHub {
owner = "simtr";
repo = "The-Powder-Toy";
rev = "v${version}";
sha256 = "19m7jyg3pnppymvr6lz454mjiw18hvldpdhi33596m9ji3nrq8x7";
};
patches = [ ./fix-env.patch ];
postPatch = ''
sed -i 's,lua5.1,lua,g' SConscript
'';
nativeBuildInputs = [ scons pkgconfig ];
buildInputs = [ SDL lua fftwFloat zlib bzip2 ];
buildPhase = "scons DESTDIR=$out/bin --tool='' -j$NIX_BUILD_CORES";
installPhase = ''
install -Dm 755 build/powder* "$out/bin/powder"
'';
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "A free 2D physics sandbox game";
homepage = "http://powdertoy.co.uk/";
platforms = platforms.unix;
license = licenses.gpl3;
maintainers = with maintainers; [ abbradar ];
};
}