lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

openlierox: 0.58rc3 -> 0.58_rc5, unbreak, refactor, adopt

TomaSajt 6b5513c8 4f554f0f

+62 -25
+62 -25
pkgs/games/openlierox/default.nix
··· 1 - { lib, stdenv, fetchurl, libX11, xorgproto, gd, SDL, SDL_image, SDL_mixer, zlib 2 - , libxml2, pkg-config, curl, cmake, libzip }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + cmake, 6 + pkg-config, 7 + curl, 8 + gd, 9 + libX11, 10 + libxml2, 11 + libzip, 12 + SDL, 13 + SDL_image, 14 + SDL_mixer, 15 + zlib, 16 + }: 3 17 4 - stdenv.mkDerivation rec { 18 + stdenv.mkDerivation (finalAttrs: { 5 19 pname = "openlierox"; 6 - version = "0.58rc3"; 20 + version = "0.58_rc5"; 7 21 8 - src = fetchurl { 9 - url = "mirror://sourceforge/openlierox/OpenLieroX_0.58_rc3.src.tar.bz2"; 10 - sha256 = "1k35xppfqi3qfysv81xq3hj4qdy9j2ciinbkfdcmwclcsf3nh94z"; 22 + src = fetchFromGitHub { 23 + owner = "albertz"; 24 + repo = "openlierox"; 25 + rev = finalAttrs.version; 26 + hash = "sha256-4ofjroEHlfrQitc7M+YTNWut0LGgntgQoOeBWU8nscY="; 11 27 }; 12 28 13 - env.NIX_CFLAGS_COMPILE = "-I${libxml2.dev}/include/libxml2 -std=c++98 -Wno-error"; 29 + postPatch = '' 30 + sed 1i'#include <cstdint>' -i src/common/s*x.cpp 31 + sed 1i'#include <libxml/parser.h>' -i include/XMLutils.h 32 + substituteInPlace src/common/StringUtils.cpp \ 33 + --replace-fail "xmlErrorPtr" "const xmlError*" 34 + ''; 35 + 36 + strictDeps = true; 37 + 38 + nativeBuildInputs = [ 39 + cmake 40 + pkg-config 41 + SDL 42 + ]; 14 43 15 - # The breakpad fails to build on x86_64, and it's only to report bugs upstream 16 - cmakeFlags = [ "-DBREAKPAD=0" ]; 44 + buildInputs = [ 45 + curl 46 + gd 47 + libX11 48 + libxml2 49 + libzip 50 + SDL 51 + SDL_image 52 + SDL_mixer 53 + zlib 54 + ]; 17 55 18 - preConfigure = '' 19 - cmakeFlags="$cmakeFlags -DSYSTEM_DATA_DIR=$out/share" 20 - ''; 56 + cmakeFlags = [ "-DSYSTEM_DATA_DIR=${placeholder "out"}/share" ]; 21 57 22 - patchPhase = '' 23 - sed -i s,curl/types.h,curl/curl.h, include/HTTP.h src/common/HTTP.cpp 24 - ''; 58 + env.NIX_CFLAGS_COMPILE = "-I${lib.getDev libxml2}/include/libxml2"; 25 59 26 60 installPhase = '' 27 - mkdir -p $out/bin $out/share/OpenLieroX 28 - cp bin/* $out/bin 29 - cp -R ../share/gamedir/* $out/share/OpenLieroX 61 + runHook preInstall 62 + 63 + install -Dm755 bin/* -t $out/bin 64 + 65 + mkdir -p $out/share/OpenLieroX 66 + cp -r ../share/gamedir/* $out/share/OpenLieroX 67 + 68 + runHook postInstall 30 69 ''; 31 70 32 - nativeBuildInputs = [ cmake pkg-config curl ]; 33 - buildInputs = [ libX11 xorgproto gd SDL SDL_image SDL_mixer zlib libxml2 34 - libzip ]; 35 - 36 71 meta = { 37 - homepage = "http://openlierox.net"; 38 72 description = "Real-time game with Worms-like shooting"; 73 + homepage = "http://openlierox.net"; 39 74 license = lib.licenses.lgpl2Plus; 75 + mainProgram = "openlierox"; 76 + maintainers = with lib.maintainers; [ tomasajt ]; 40 77 platforms = lib.platforms.linux; 41 78 }; 42 - } 79 + })