diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-30 13:44:37 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-30 13:44:37 +0000 |
commit | 16f676d6bbd4f930b0017ccb20cebe5a29e17545 (patch) | |
tree | 0d554b4f16bdef502035b743457fc29ffcc5e7f7 /nixpkgs/pkgs/games/gemrb | |
parent | e7caacc4c122b7641bb66a4c2595289347a4996c (diff) | |
parent | 3a8d7958a610cd3fec3a6f424480f91a1b259185 (diff) | |
download | nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.gz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.bz2 nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.lz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.xz nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.tar.zst nixlib-16f676d6bbd4f930b0017ccb20cebe5a29e17545.zip |
Merge commit '3a8d7958a610cd3fec3a6f424480f91a1b259185'
Diffstat (limited to 'nixpkgs/pkgs/games/gemrb')
-rw-r--r-- | nixpkgs/pkgs/games/gemrb/default.nix | 66 |
1 files changed, 52 insertions, 14 deletions
diff --git a/nixpkgs/pkgs/games/gemrb/default.nix b/nixpkgs/pkgs/games/gemrb/default.nix index 9c5744f7291a..77c9c7adaf9f 100644 --- a/nixpkgs/pkgs/games/gemrb/default.nix +++ b/nixpkgs/pkgs/games/gemrb/default.nix @@ -1,32 +1,71 @@ -{ lib, stdenv, fetchFromGitHub, cmake -, freetype, SDL2, SDL2_mixer, openal, zlib, libpng, python2, libvorbis -, libiconv }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, SDL2 +, SDL2_mixer +, freetype +, libGL +, libiconv +, libpng +, libvlc +, libvorbis +, openal +, python2 # 0.9.0 crashes after character generation with py3, so stick to py2 for now +, zlib +}: +let + # the GLES backend on rpi is untested as I don't have the hardware + backend = + if (stdenv.isx86_32 || stdenv.isx86_64) then "OpenGL" else "GLES"; + +in stdenv.mkDerivation rec { pname = "gemrb"; - version = "0.8.7"; + version = "0.9.0"; src = fetchFromGitHub { owner = "gemrb"; repo = "gemrb"; rev = "v${version}"; - sha256 = "14j9mhrbi4gnrbv25nlsvcxzkylijzrnwbqqnrg7pr452lb3srpb"; + sha256 = "sha256-h/dNPY0QZ2m7aYgRla3r1E8APJqO99ePa2ABhhh3Aoc="; }; - # TODO: make libpng, libvorbis, sdl_mixer, freetype, vlc, glew (and other gl - # reqs) optional - buildInputs = [ freetype python2 openal SDL2 SDL2_mixer zlib libpng libvorbis libiconv ]; + buildInputs = [ + SDL2 + SDL2_mixer + freetype + libGL + libiconv + libpng + libvlc + libvorbis + openal + python2 + zlib + ]; nativeBuildInputs = [ cmake ]; - # TODO: add proper OpenGL support. We are currently (0.8.7) getting a shader - # error on execution when enabled. + LIBVLC_INCLUDE_PATH = "${lib.getDev libvlc}/include"; + LIBVLC_LIBRARY_PATH = "${lib.getLib libvlc}/lib"; + cmakeFlags = [ + # use the Mesa drivers for video on ARM (harmless on x86) + "-DDISABLE_VIDEOCORE=ON" "-DLAYOUT=opt" - # "-DOPENGL_BACKEND=GLES" - # "-DOpenGL_GL_PREFERENCE=GLVND" + "-DOPENGL_BACKEND=${backend}" + "-DOpenGL_GL_PREFERENCE=GLVND" ]; + postInstall = '' + for s in 36 48 72 96 144; do + install -Dm444 ../artwork/gemrb-logo-glow-''${s}px.png $out/share/icons/hicolor/''${s}x''${s}/gemrb.png + done + install -Dm444 ../artwork/gemrb-logo.png $out/share/icons/gemrb.png + ''; + meta = with lib; { description = "A reimplementation of the Infinity Engine, used by games such as Baldur's Gate"; longDescription = '' @@ -36,8 +75,7 @@ stdenv.mkDerivation rec { ruleset (Baldur's Gate and Icewind Dale series, Planescape: Torment). ''; homepage = "https://gemrb.org/"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = with maintainers; [ peterhoeg ]; - platforms = platforms.all; }; } |