git.iko.soy/typeable/nixpkgs
on master help sign in
the-powder-toy: add derivation
commit1fa5e7ae3cb990362a8b05a3fdaf5917a4b0b3e6 authorNikolay Amiantov <ab@fmap.me> dateWed 8 Apr 2015, 01:44 (12 years ago) parent1035b7b
3 files changed+55−1
pkgs/games/the-powder-toy/default.nix+34 pkgs/games/the-powder-toy/fix-env.patch+16 pkgs/top-level/all-packages.nix+5−1
pkgs/games/the-powder-toy/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat }:
2+
3+let version = "90.2.322";
4+in
5+stdenv.mkDerivation rec {
6+ name = "the-powder-toy-${version}";
7+ src = fetchFromGitHub {
8+ owner = "simtr";
9+ repo = "The-Powder-Toy";
10+ rev = "v${version}";
11+ sha256 = "1rlxnk8icymalnr3j4bgpklq1dhhs0rpsyjx97isqqcwm2ys03q3";
12+ };
13+
14+ patches = [ ./fix-env.patch ];
15+
16+ nativeBuildInputs = [ scons pkgconfig ];
17+
18+ buildInputs = [ SDL lua fftwFloat ];
19+
20+ buildPhase = "scons DESTDIR=$out/bin --tool='' -j$NIX_BUILD_CORES";
21+
22+ installPhase = ''
23+ install -Dm 755 build/powder* "$out/bin/powder"
24+ '';
25+
26+ enableParallelBuilding = true;
27+
28+ meta = with stdenv.lib; {
29+ description = "A free 2D physics sandbox game";
30+ platforms = platforms.unix;
31+ license = licenses.gpl3;
32+ maintainers = with maintainers; [ abbradar ];
33+ };
34+}
pkgs/games/the-powder-toy/fix-env.patchnew file+16
@@ -0,0 +1,16 @@
1+diff --git a/SConscript b/SConscript
2+index fd08935..4d879b2 100644
3+--- a/SConscript
4++++ b/SConscript
5+@@ -93,9 +93,9 @@ if msvc and platform != "Windows":
6+
7+ #Create SCons Environment
8+ if platform == "Windows" and not GetOption('msvc'):
9+- env = Environment(tools = ['mingw'], ENV = {'PATH' : os.environ['PATH']})
10++ env = Environment(tools = ['mingw'], ENV = os.environ)
11+ else:
12+- env = Environment(tools = ['default'], ENV = {'PATH' : os.environ['PATH']})
13++ env = Environment(tools = ['default'], ENV = os.environ)
14+
15+ #attempt to automatically find cross compiler
16+ if not tool and compilePlatform == "Linux" and compilePlatform != platform:
pkgs/top-level/all-packages.nix+5−1
@@ -12828,7 +12828,11 @@ let
1282812828
1282912829 synthv1 = callPackage ../applications/audio/synthv1 { };
1283012830
12831− tbe = callPackage ../games/the-butterfly-effect {};
12831+ the-powder-toy = callPackage ../games/the-powder-toy {
12832+ lua = lua5_1;
12833+ };
12834+
12835+ tbe = callPackage ../games/the-butterfly-effect { };
1283212836
1283312837 teetertorture = callPackage ../games/teetertorture { };
1283412838