diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/games/the-powder-toy | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/games/the-powder-toy')
-rw-r--r-- | nixpkgs/pkgs/games/the-powder-toy/default.nix | 39 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/the-powder-toy/fix-env.patch | 11 |
2 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/the-powder-toy/default.nix b/nixpkgs/pkgs/games/the-powder-toy/default.nix new file mode 100644 index 000000000000..6d10b8e2072f --- /dev/null +++ b/nixpkgs/pkgs/games/the-powder-toy/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, scons, pkgconfig, SDL, lua, fftwFloat, zlib, bzip2 }: + +stdenv.mkDerivation rec { + name = "the-powder-toy-${version}"; + version = "92.5"; + + src = fetchFromGitHub { + owner = "simtr"; + repo = "The-Powder-Toy"; + rev = "v${version}"; + sha256 = "1n15kgl4qnz55b32ddgmhrv64cl3awbds8arycn7mkf7akwdg1g6"; + }; + + patches = [ ./fix-env.patch ]; + + postPatch = '' + sed -i 's,lua5.1,lua,g' SConscript + ''; + + nativeBuildInputs = [ scons pkgconfig ]; + + buildInputs = [ SDL lua fftwFloat zlib bzip2 ]; + + sconsFlags = "--tool="; + + 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 = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; + license = licenses.gpl3; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/nixpkgs/pkgs/games/the-powder-toy/fix-env.patch b/nixpkgs/pkgs/games/the-powder-toy/fix-env.patch new file mode 100644 index 000000000000..b09fd4dcbe9c --- /dev/null +++ b/nixpkgs/pkgs/games/the-powder-toy/fix-env.patch @@ -0,0 +1,11 @@ +--- a/SConscript ++++ b/SConscript +@@ -99,7 +99,7 @@ + elif platform == "Windows" and not GetOption('msvc'): + env = Environment(tools=['mingw'], ENV={'PATH' : os.environ['PATH']}) + 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: |