Last active
June 28, 2016 02:48
-
-
Save selenologist/6ee15a5b52d510621857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, scons, pkgconfig, xlibs, alsaLib, fetchzip, xorg, x11 | |
, libpulseaudio, freetype, mesa, mesa_glu, openssl, fetchgit | |
, udev}: | |
let | |
pname = "godot"; | |
version = "2.0.3-stable-with-gdnet"; | |
in | |
stdenv.mkDerivation rec { | |
name = "${pname}-${version}"; | |
src = fetchzip { | |
url = "https://github.com/godotengine/godot/archive/2.0.3-stable.zip"; | |
sha256 = "0363sqbqmdfa1krfjbg3fwjfh5fxb46bk9g69s1p4cdzmpry4xma"; | |
}; | |
gdNet = fetchgit { | |
url = "git://github.com/jrimclean/gdnet"; | |
rev = "3caf107935c5d2e5b15bf220f7c12f5952be7a6e"; | |
sha256 = "0j5vkv88w4i4fi5576i0n0y8xi5qvrmlp762dnspdikppnqwjv6r"; | |
}; | |
COMPILE_THREADS = 9; | |
buildInputs = [ | |
scons pkgconfig xlibs.libX11 xlibs.libXcursor alsaLib.dev libpulseaudio x11 | |
freetype mesa mesa_glu openssl xlibs.xineramaproto udev | |
xorg.libXinerama | |
]; | |
meta = { | |
homepage = "http://godotengine.org"; | |
description = "Free and Open Source 2D and 3D game engine"; | |
license = stdenv.lib.licenses.mit; | |
}; | |
configurePhase = | |
"cp -r $gdNet $src/modules/gdnet"; | |
patches = [ ./scons_hack.patch ]; | |
buildPhase = | |
"scons platform=x11 prefix=$out -j $COMPILE_THREADS"; | |
installPhase = | |
"mkdir $out/bin | |
cp $src/bin $out/bin"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -ru godot-orig/platform/x11/detect.py godot/platform/x11/detect.py | |
--- godot-orig/platform/x11/detect.py 2016-06-28 11:45:49.549889379 +1000 | |
+++ godot/platform/x11/detect.py 2016-06-28 11:46:07.800059405 +1000 | |
@@ -153,6 +153,7 @@ | |
print("Enabling ALSA") | |
env.Append(CPPFLAGS=["-DALSA_ENABLED"]) | |
env.Append(LIBS=['asound']) | |
+ env.ParseConfig('pkg-config --cflags --libs alsa') | |
else: | |
print("ALSA libraries not found, disabling driver") | |
@@ -179,6 +180,9 @@ | |
env.Append(CPPFLAGS=['-DX11_ENABLED','-DUNIX_ENABLED','-DGLES2_ENABLED','-DGLES_OVER_GL']) | |
env.Append(LIBS=['GL', 'GLU', 'pthread', 'z']) | |
+ env.ParseConfig('pkg-config --cflags --libs glu') | |
+ env.ParseConfig('pkg-config --cflags --libs zlib') | |
+ | |
#env.Append(CPPFLAGS=['-DMPC_FIXED_POINT']) | |
#host compiler is default.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment