Skip to content

Instantly share code, notes, and snippets.

@tilpner
Created November 2, 2018 14:07
Show Gist options
  • Save tilpner/084dc7b24d3c926d3c57e7c9e40c4caa to your computer and use it in GitHub Desktop.
Save tilpner/084dc7b24d3c926d3c57e7c9e40c4caa to your computer and use it in GitHub Desktop.
{ stdenv, gcc5, fetchFromGitHub, scons, pkgconfig, xlibs
, freetype, openssl, alsaLib
, libpulseaudio, mesa_glu, zlib }:
let
gcc5Stdenv = stdenv.override {
allowedRequisites = null;
cc = gcc5;
};
in gcc5Stdenv.mkDerivation rec {
name = "godot-${version}";
version = "e3a1bf247d65e9aaffb28548bfb6295cd6720cb8";
src = fetchFromGitHub {
owner = "godotengine";
repo = "godot";
rev = version;
sha256 = "07cr51136mydw8g4hjfnz7wc7w2ga53lln7l24vjw9wr48ld99kn";
};
buildInputs = [
gcc5 scons pkgconfig freetype openssl alsaLib libpulseaudio mesa_glu zlib
] ++ (with xlibs; [
libX11 libXcursor libXinerama libXrandr libXrender
]);
patches = [ ./pkg_config_additions.patch ];
enableParallelBuilding = true;
buildPhase = ''
scons platform=x11 prefix=$out -j $NIX_BUILD_CORES
'';
installPhase = ''
mkdir $out/bin -p
cp bin/godot.* $out/bin/
'';
meta = with gcc5Stdenv; {
homepage = "https://godotengine.org";
description = "Free and Open Source 2D and 3D game engine";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
};
}
+++ build/platform/x11/detect.py
@@ -139,6 +139,10 @@
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xcursor --cflags --libs')
env.ParseConfig('pkg-config xrandr --cflags --libs')
+ env.ParseConfig('pkg-config xrender --cflags --libs')
+ env.ParseConfig('pkg-config osmesa --cflags')
+ env.ParseConfig('pkg-config glu --cflags --libs')
+ env.ParseConfig('pkg-config zlib --cflags --libs')
if (env['builtin_openssl'] == 'no'):
# Currently not compatible with OpenSSL 1.1.0+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment