nixpkgs/pkgs/games/the-powder-toy/default.nix

36 lines
954 B
Nix
Raw Normal View History

2021-01-17 02:04:36 +00:00
{ lib, stdenv, fetchFromGitHub, scons, pkg-config, SDL2, lua, fftwFloat,
2020-08-08 01:57:13 +01:00
zlib, bzip2, curl, darwin }:
2015-04-07 23:44:39 +01:00
stdenv.mkDerivation rec {
pname = "the-powder-toy";
2020-08-08 01:57:13 +01:00
version = "95.0";
2016-08-13 01:15:04 +01:00
2015-04-07 23:44:39 +01:00
src = fetchFromGitHub {
2020-08-08 01:57:13 +01:00
owner = "The-Powder-Toy";
2015-04-07 23:44:39 +01:00
repo = "The-Powder-Toy";
rev = "v${version}";
2020-08-08 01:57:13 +01:00
sha256 = "18rp2g1mj0gklra06wm9dm57h73hmm301npndh0y8ap192i5s8sa";
2015-04-07 23:44:39 +01:00
};
2021-01-17 02:04:36 +00:00
nativeBuildInputs = [ scons pkg-config ];
2015-04-07 23:44:39 +01:00
2021-01-15 04:31:39 +00:00
propagatedBuildInputs = lib.optionals stdenv.isDarwin
2020-08-08 01:57:13 +01:00
[ darwin.apple_sdk.frameworks.Cocoa ];
2015-04-07 23:44:39 +01:00
2020-08-08 01:57:13 +01:00
buildInputs = [ SDL2 lua fftwFloat zlib bzip2 curl ];
2015-04-07 23:44:39 +01:00
installPhase = ''
install -Dm 755 build/powder* "$out/bin/powder"
'';
enableParallelBuilding = true;
meta = with lib; {
2015-04-07 23:44:39 +01:00
description = "A free 2D physics sandbox game";
homepage = "http://powdertoy.co.uk/";
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
2015-04-07 23:44:39 +01:00
license = licenses.gpl3;
2020-08-08 01:57:13 +01:00
maintainers = with maintainers; [ abbradar siraben ];
2015-04-07 23:44:39 +01:00
};
}