shattered-pixel-dungeon: almost fix darwin build

Gradle has some problems with termcap:

> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Could not open terminal for stdout: could not get termcap entry

see https://github.com/gradle/gradle/issues/4426

Unfortunately before the merge darwin broke again, so while this is now
in a better state it is still broken:
https://github.com/NixOS/nixpkgs/pull/99885#issuecomment-740065005
This commit is contained in:
Francesco Gazzetta 2020-12-02 16:36:44 +01:00
parent ec61ccd525
commit 61b83e68dc

View file

@ -34,6 +34,8 @@ let
nativeBuildInputs = [ gradle_5 perl ];
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426
${stdenv.lib.optionalString stdenv.isDarwin "export TERM=dumb"}
gradle --no-daemon desktop:release
'';
# perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
@ -54,6 +56,8 @@ in stdenv.mkDerivation rec {
buildPhase = ''
export GRADLE_USER_HOME=$(mktemp -d)
# https://github.com/gradle/gradle/issues/4426
${stdenv.lib.optionalString stdenv.isDarwin "export TERM=dumb"}
# point to offline repo
sed -ie "s#repositories {#repositories { maven { url '${deps}' };#g" build.gradle
gradle --offline --no-daemon desktop:release
@ -78,6 +82,8 @@ in stdenv.mkDerivation rec {
license = licenses.gpl3;
maintainers = with maintainers; [ fgaz ];
platforms = platforms.all;
# https://github.com/NixOS/nixpkgs/pull/99885#issuecomment-740065005
broken = stdenv.isDarwin;
};
}