mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 15:36:47 +03:00
the-powder-toy: add derivation
This commit is contained in:
parent
1035b7b6c9
commit
1fa5e7ae3c
34
pkgs/games/the-powder-toy/default.nix
Normal file
34
pkgs/games/the-powder-toy/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat }:
|
||||
|
||||
let version = "90.2.322";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "the-powder-toy-${version}";
|
||||
src = fetchFromGitHub {
|
||||
owner = "simtr";
|
||||
repo = "The-Powder-Toy";
|
||||
rev = "v${version}";
|
||||
sha256 = "1rlxnk8icymalnr3j4bgpklq1dhhs0rpsyjx97isqqcwm2ys03q3";
|
||||
};
|
||||
|
||||
patches = [ ./fix-env.patch ];
|
||||
|
||||
nativeBuildInputs = [ scons pkgconfig ];
|
||||
|
||||
buildInputs = [ SDL lua fftwFloat ];
|
||||
|
||||
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";
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ abbradar ];
|
||||
};
|
||||
}
|
16
pkgs/games/the-powder-toy/fix-env.patch
Normal file
16
pkgs/games/the-powder-toy/fix-env.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/SConscript b/SConscript
|
||||
index fd08935..4d879b2 100644
|
||||
--- a/SConscript
|
||||
+++ b/SConscript
|
||||
@@ -93,9 +93,9 @@ if msvc and platform != "Windows":
|
||||
|
||||
#Create SCons Environment
|
||||
if platform == "Windows" and not GetOption('msvc'):
|
||||
- env = Environment(tools = ['mingw'], ENV = {'PATH' : os.environ['PATH']})
|
||||
+ env = Environment(tools = ['mingw'], ENV = os.environ)
|
||||
else:
|
||||
- env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH']})
|
||||
+ env = Environment(tools = ['default'], ENV = os.environ)
|
||||
|
||||
#attempt to automatically find cross compiler
|
||||
if not tool and compilePlatform == "Linux" and compilePlatform != platform:
|
@ -12828,7 +12828,11 @@ let
|
||||
|
||||
synthv1 = callPackage ../applications/audio/synthv1 { };
|
||||
|
||||
tbe = callPackage ../games/the-butterfly-effect {};
|
||||
the-powder-toy = callPackage ../games/the-powder-toy {
|
||||
lua = lua5_1;
|
||||
};
|
||||
|
||||
tbe = callPackage ../games/the-butterfly-effect { };
|
||||
|
||||
teetertorture = callPackage ../games/teetertorture { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user