diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-12-17 17:44:14 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-12-17 17:44:14 +0100 |
commit | 778336429cc37ad5b0d736336141d09bf227653d (patch) | |
tree | 4aa85bd5d87d5bb5fb2c35ab9313987606abca89 /nixpkgs/pkgs/games | |
parent | 6b8e2555ef013b579cda57025b17d662e0f1fe1f (diff) | |
parent | 7d6929828a2d28eda9d37254ff6be3b6819506ca (diff) | |
download | nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.gz nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.bz2 nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.lz nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.xz nixlib-778336429cc37ad5b0d736336141d09bf227653d.tar.zst nixlib-778336429cc37ad5b0d736336141d09bf227653d.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/games')
-rw-r--r-- | nixpkgs/pkgs/games/endless-sky/default.nix | 41 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/endless-sky/fixes.patch | 39 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/gogui/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/hyperrogue/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/games/vcmi/default.nix | 17 |
5 files changed, 73 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/games/endless-sky/default.nix b/nixpkgs/pkgs/games/endless-sky/default.nix index ac44390faf56..9a3e86117cef 100644 --- a/nixpkgs/pkgs/games/endless-sky/default.nix +++ b/nixpkgs/pkgs/games/endless-sky/default.nix @@ -1,22 +1,39 @@ -{ lib, stdenv, fetchFromGitHub -, SDL2, libpng, libjpeg, glew, openal, scons, libmad, libuuid +{ lib +, stdenv +, fetchFromGitHub +, SDL2 +, libpng +, libjpeg +, glew +, openal +, scons +, libmad +, libuuid }: stdenv.mkDerivation rec { pname = "endless-sky"; - version = "0.9.16.1"; + version = "0.10.4"; src = fetchFromGitHub { owner = "endless-sky"; repo = "endless-sky"; rev = "v${version}"; - sha256 = "sha256-bohljxAtSVqsfnge6t4LF3pC1s1r99v3hNLKTBquC20="; + sha256 = "sha256-VTg8H6umq9yMMP274StIJfEZZvUFDILiMKhioam58QE="; }; patches = [ ./fixes.patch ]; + postPatch = '' + # the trailing slash is important!! + # endless sky naively joins the paths with string concatenation + # so it's essential that there be a trailing slash on the resources path + substituteInPlace source/Files.cpp \ + --replace '%NIXPKGS_RESOURCES_PATH%' "$out/share/games/endless-sky/" + ''; + preBuild = '' export AR="${stdenv.cc.targetPrefix}gcc-ar" ''; @@ -24,7 +41,14 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; buildInputs = [ - SDL2 libpng libjpeg glew openal scons libmad libuuid + SDL2 + libpng + libjpeg + glew + openal + scons + libmad + libuuid ]; prefixKey = "PREFIX="; @@ -33,9 +57,12 @@ stdenv.mkDerivation rec { description = "A sandbox-style space exploration game similar to Elite, Escape Velocity, or Star Control"; homepage = "https://endless-sky.github.io/"; license = with licenses; [ - gpl3Plus cc-by-sa-30 cc-by-sa-40 publicDomain + gpl3Plus + cc-by-sa-30 + cc-by-sa-40 + publicDomain ]; - maintainers = with maintainers; [ lheckemann ]; + maintainers = with maintainers; [ lheckemann _360ied ]; platforms = platforms.linux; # Maybe other non-darwin Unix }; } diff --git a/nixpkgs/pkgs/games/endless-sky/fixes.patch b/nixpkgs/pkgs/games/endless-sky/fixes.patch index 359e2ee4af3b..b6f330eca442 100644 --- a/nixpkgs/pkgs/games/endless-sky/fixes.patch +++ b/nixpkgs/pkgs/games/endless-sky/fixes.patch @@ -12,13 +12,19 @@ index 48fd080..419b40d 100644 # Install the desktop file: env.Install("$DESTDIR$PREFIX/share/applications", "endless-sky.desktop") diff --git a/source/Files.cpp b/source/Files.cpp -index c8c8957..d196459 100644 +index de27023e..4225051f 100644 --- a/source/Files.cpp +++ b/source/Files.cpp -@@ -114,15 +114,9 @@ void Files::Init(const char * const *argv) - if(resources.back() != '/') - resources += '/'; - #if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__ +@@ -108,32 +108,9 @@ void Files::Init(const char * const *argv) + resources = str; + SDL_free(str); + } +-#if defined _WIN32 +- FixWindowsSlashes(resources); +-#endif +- if(resources.back() != '/') +- resources += '/'; +-#if defined __linux__ || defined __FreeBSD__ || defined __DragonFly__ - // Special case, for Linux: the resource files are not in the same place as - // the executable, but are under the same prefix (/usr or /usr/local). - static const string LOCAL_PATH = "/usr/local/"; @@ -28,9 +34,20 @@ index c8c8957..d196459 100644 - resources = LOCAL_PATH + RESOURCE_PATH; - else if(!resources.compare(0, STANDARD_PATH.length(), STANDARD_PATH)) - resources = STANDARD_PATH + RESOURCE_PATH; -+ // Workaround for NixOS. Not sure how to proceed with other OSes, feedback -+ // is welcome. -+ resources += "../share/games/endless-sky/"; - #elif defined __APPLE__ - // Special case for Mac OS X: the resources are in ../Resources relative to - // the folder the binary is in. +-#endif +- // If the resources are not here, search in the directories containing this +- // one. This allows, for example, a Mac app that does not actually have the +- // resources embedded within it. +- while(!Exists(resources + "credits.txt")) +- { +- size_t pos = resources.rfind('/', resources.length() - 2); +- if(pos == string::npos || pos == 0) +- throw runtime_error("Unable to find the resource directories!"); +- resources.erase(pos + 1); +- } ++ ++ resources = "%NIXPKGS_RESOURCES_PATH%"; ++ + dataPath = resources + "data/"; + imagePath = resources + "images/"; + soundPath = resources + "sounds/"; diff --git a/nixpkgs/pkgs/games/gogui/default.nix b/nixpkgs/pkgs/games/gogui/default.nix index 212f0af0e8e3..43e1f3397b8f 100644 --- a/nixpkgs/pkgs/games/gogui/default.nix +++ b/nixpkgs/pkgs/games/gogui/default.nix @@ -11,7 +11,7 @@ }: let - version = "1.5.3"; + version = "1.5.4a"; in stdenv.mkDerivation { pname = "gogui"; inherit version; @@ -20,7 +20,7 @@ in stdenv.mkDerivation { owner = "Remi-Coulom"; repo = "gogui"; rev = "v${version}"; - hash = "sha256-GezFhNYB542JnAIUeUVa188+SR5mCedwj0hZN8L83UQ="; + hash = "sha256-UFhOk2mAnTtxfwEOHquN64YDCRq7nNUqZAPQf77MEEw="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/games/hyperrogue/default.nix b/nixpkgs/pkgs/games/hyperrogue/default.nix index 30698016a325..8ea692587d0e 100644 --- a/nixpkgs/pkgs/games/hyperrogue/default.nix +++ b/nixpkgs/pkgs/games/hyperrogue/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "hyperrogue"; - version = "12.1y"; + version = "12.1z"; src = fetchFromGitHub { owner = "zenorogue"; repo = "hyperrogue"; rev = "v${version}"; - sha256 = "sha256-YCjDqpbb3OxJmek8KesCb3uACVCFYIAsaF3U1jO/CU4="; + sha256 = "sha256-L9T61fyMURlPtUidbwDnkvI7bb7fobNeyYhDleOCU4Y="; }; CXXFLAGS = [ diff --git a/nixpkgs/pkgs/games/vcmi/default.nix b/nixpkgs/pkgs/games/vcmi/default.nix index ad5aa48c7c5d..2dd27400961d 100644 --- a/nixpkgs/pkgs/games/vcmi/default.nix +++ b/nixpkgs/pkgs/games/vcmi/default.nix @@ -27,14 +27,13 @@ stdenv.mkDerivation rec { pname = "vcmi"; - version = "1.3.2"; + version = "1.4.0"; src = fetchFromGitHub { owner = "vcmi"; repo = "vcmi"; rev = version; - fetchSubmodules = true; - hash = "sha256-dwTQRpu+IrKhuiiw/uYBt8i/BYlQ5XCy/jUhDAo6aa4="; + hash = "sha256-MhY3tpKlrIgq6QXZwAkMnObYYpUxsPcysTR5CZH1rhE="; }; nativeBuildInputs = [ @@ -63,10 +62,10 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DENABLE_LUA:BOOL=ON" - "-DENABLE_ERM:BOOL=OFF" + "-DENABLE_ERM:BOOL=ON" "-DENABLE_GITVERSION:BOOL=OFF" "-DENABLE_PCH:BOOL=OFF" - "-DENABLE_TEST:BOOL=OFF" + "-DENABLE_TEST:BOOL=OFF" # Tests require HOMM3 data files. "-DFORCE_BUNDLED_MINIZIP:BOOL=OFF" "-DFORCE_BUNDLED_FL:BOOL=OFF" "-DCMAKE_INSTALL_RPATH:STRING=$out/lib/vcmi" @@ -80,12 +79,10 @@ stdenv.mkDerivation rec { --prefix PATH : "${lib.makeBinPath [ innoextract ffmpeg unshield ]}" ''; - doCheck = true; - passthru.tests.version = testers.testVersion { package = vcmi; command = '' - XDG_DATA_HOME=$PWD XDG_CACHE_HOME=$PWD XDG_CONFIG_HOME=$PWD \ + XDG_DATA_HOME="$TMPDIR" XDG_CACHE_HOME="$TMPDIR" XDG_CONFIG_HOME="$TMPDIR" \ vcmiclient --version ''; }; @@ -93,8 +90,8 @@ stdenv.mkDerivation rec { meta = with lib; { description = "An open-source engine for Heroes of Might and Magic III"; homepage = "https://vcmi.eu"; - changelog = "https://github.com/vcmi/vcmi/blob/${src.rev}/ChangeLog"; - license = with licenses; [ gpl2Only cc-by-sa-40 ]; + changelog = "https://github.com/vcmi/vcmi/blob/${src.rev}/ChangeLog.md"; + license = with licenses; [ gpl2Plus cc-by-sa-40 ]; maintainers = with maintainers; [ azahi ]; platforms = platforms.linux; mainProgram = "vcmilauncher"; |