mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 10:53:11 +00:00
37 lines
986 B
Nix
37 lines
986 B
Nix
{ lib, stdenv, fetchFromGitHub, scons, pkg-config, SDL2, lua, fftwFloat,
|
|
zlib, bzip2, curl, darwin }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "the-powder-toy";
|
|
version = "95.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "The-Powder-Toy";
|
|
repo = "The-Powder-Toy";
|
|
rev = "v${version}";
|
|
sha256 = "18rp2g1mj0gklra06wm9dm57h73hmm301npndh0y8ap192i5s8sa";
|
|
};
|
|
|
|
nativeBuildInputs = [ scons pkg-config ];
|
|
|
|
propagatedBuildInputs = lib.optionals stdenv.isDarwin
|
|
[ darwin.apple_sdk.frameworks.Cocoa ];
|
|
|
|
buildInputs = [ SDL2 lua fftwFloat zlib bzip2 curl ];
|
|
|
|
installPhase = ''
|
|
install -Dm 755 build/powder* "$out/bin/powder"
|
|
'';
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
meta = with lib; {
|
|
description = "A free 2D physics sandbox game";
|
|
homepage = "http://powdertoy.co.uk/";
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
|
license = licenses.gpl3Plus;
|
|
maintainers = with maintainers; [ abbradar siraben ];
|
|
mainProgram = "powder";
|
|
};
|
|
}
|