godot: 2.1.4 -> 3.0

This commit is contained in:
James Kay 2018-02-14 17:42:48 +00:00
parent 1317428ca0
commit ef7a25fcc0
No known key found for this signature in database
GPG Key ID: 76BE7F17BF11AD15
2 changed files with 25 additions and 12 deletions

View File

@ -1,22 +1,29 @@
{ stdenv, fetchFromGitHub, gcc5, scons, pkgconfig, libX11, libXcursor
, libXinerama, libXrandr, libXrender, freetype, openssl, alsaLib
, libpulseaudio, libGLU, zlib }:
{ stdenv, lib, fetchFromGitHub, gcc5, scons, pkgconfig, libX11, libXcursor
, libXinerama, libXrandr, libXrender, libpulseaudio ? null
, libXi ? null, libXext, libXfixes, freetype, openssl
, alsaLib, libGLU, zlib, yasm ? null }:
stdenv.mkDerivation rec {
let
options = {
touch = libXi != null;
pulseaudio = false;
};
in stdenv.mkDerivation rec {
name = "godot-${version}";
version = "2.1.4";
version = "3.0";
src = fetchFromGitHub {
owner = "godotengine";
repo = "godot";
rev = "${version}-stable";
sha256 = "0d2zczn5k7296sky5gllq55cxd586nx134y2iwjpkqqjr62g0h48";
sha256 = "1pgs2hghjhs3vkgxsi50i5myr7yac3jhpk4vi4bcra1cvdmkgr39";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [
gcc5 scons libX11 libXcursor libXinerama libXrandr libXrender
freetype openssl alsaLib libpulseaudio libGLU zlib
libXi libXext libXfixes freetype openssl alsaLib libpulseaudio
libGLU zlib
];
patches = [ ./pkg_config_additions.patch ];
@ -24,12 +31,14 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
buildPhase = ''
scons platform=x11 prefix=$out -j $NIX_BUILD_CORES
scons platform=x11 prefix=$out -j $NIX_BUILD_CORES \
${lib.concatStringsSep " "
(lib.mapAttrsToList (k: v: "${k}=${builtins.toJSON v}") options)}
'';
installPhase = ''
mkdir $out/bin -p
cp bin/godot.* $out/bin/
mkdir $out
cp -r bin $out
'';
meta = {
@ -37,5 +46,6 @@ stdenv.mkDerivation rec {
description = "Free and Open Source 2D and 3D game engine";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.twey ];
};
}

View File

@ -1,9 +1,12 @@
+++ build/platform/x11/detect.py
@@ -139,6 +139,10 @@
env.ParseConfig('pkg-config xinerama --cflags --libs')
@@ -142,3 +142,10 @@
env.ParseConfig('pkg-config xcursor --cflags --libs')
env.ParseConfig('pkg-config xinerama --cflags --libs')
env.ParseConfig('pkg-config xrandr --cflags --libs')
+ env.ParseConfig('pkg-config xrender --cflags --libs')
+ env.ParseConfig('pkg-config xi --cflags --libs')
+ env.ParseConfig('pkg-config xext --cflags --libs')
+ env.ParseConfig('pkg-config xfixes --cflags --libs')
+ env.ParseConfig('pkg-config oslibGLU_combined --cflags')
+ env.ParseConfig('pkg-config glu --cflags --libs')
+ env.ParseConfig('pkg-config zlib --cflags --libs')