openloco: 25.11 -> 26.04 (#515963)

This commit is contained in:
Peder Bergebakken Sundt
2026-05-19 14:10:55 +00:00
committed by GitHub
+16 -11
View File
@@ -3,7 +3,7 @@
stdenv,
fetchFromGitHub,
fetchurl,
SDL2,
sdl3,
cmake,
libpng,
libzip,
@@ -17,31 +17,36 @@ let
sfl-src = fetchFromGitHub {
owner = "slavenf";
repo = "sfl-library";
tag = "2.0.2";
hash = "sha256-C8BRl77fryD1aNW6ASD/orb8+hrAKBqmXjr2Z4JqX94=";
tag = "2.2.0";
hash = "sha256-U1InclhSF3pte2AhKUVYBYOXZagksDMkUWgFn5ZB/tk=";
};
openloco-objects = fetchurl {
url = "https://github.com/OpenLoco/OpenGraphics/releases/download/v0.1.5/objects.zip";
sha256 = "fe8943fabad8eb07cebab5354589abd7e798a705f7993bb4d9dab2122b4fe96e";
url = "https://github.com/OpenLoco/OpenGraphics/releases/download/v0.1.8/objects.zip";
sha256 = "sha256-ZYiR2UpGBAt79x39fwG7wd2mRwcSyz3AdIKTH+tQE8c=";
};
in
stdenv.mkDerivation rec {
pname = "openloco";
version = "25.11";
version = "26.04";
src = fetchFromGitHub {
owner = "OpenLoco";
repo = "OpenLoco";
tag = "v${version}";
hash = "sha256-ohHTa5ow6wiq0GajqLcOwL9mnjocw+Od93SEaxCR2C0=";
hash = "sha256-tOvqDJfF6iG05EatUdWGp4wv8UDXdDs1frQ9FMF5myU=";
};
postPatch = ''
# the upstream build process determines the version tag from git; since we
# are not using a git checkout, we patch it manually
sed -i '/#define OPENLOCO_NAME "OpenLoco"/a#define OPENLOCO_VERSION_TAG "${version}"' src/OpenLoco/src/Version.cpp
# the upstream build process determines the version tag, branch
# and commit hash from git; since we are not using a git checkout,
# we patch it manually
sed -i '/#define OPENLOCO_NAME "OpenLoco"/a\
#define OPENLOCO_VERSION_TAG "${version}"\
#define OPENLOCO_BRANCH "master"\
#define OPENLOCO_COMMIT_SHA1_SHORT "b79ace0"'\
src/Version/include/OpenLoco/Version.hpp
# prefetch sfl header sources
grep -q 'GIT_TAG \+${sfl-src.tag}' thirdparty/CMakeLists.txt
@@ -63,7 +68,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
SDL2
sdl3
libpng
libzip
openal