openomf: 0.8.5 -> 0.8.6

This commit is contained in:
Keenan Weaver
2026-07-06 07:04:45 -05:00
parent 6852ba617e
commit 95ec8b53bf
+25 -8
View File
@@ -6,7 +6,6 @@
cmake,
argtable,
enet,
git,
libconfuse,
libnatpmp,
libepoxy,
@@ -30,25 +29,39 @@ let
url = "https://www.omf2097.com/pub/files/omf/openomf-icons.zip";
hash = "sha256-8LWmrkY3ZiXcuVe0Zj90RQFUTwM27dJ4ev9TiBGoVk0=";
};
remix = fetchurl {
url = "https://github.com/omf2097/openomf/releases/download/0.8.0/ARENA2.ogg";
hash = "sha256-jOIzDaIwQDlwCaPrRZdG5Y0g7bWKwc38mPKP030PGb4=";
musicRemixes = fetchurl {
url = "https://github.com/omf2097/openomf-music-mod/releases/download/1.0/openomf-mods-1.0.zip";
hash = "sha256-uiaM6n+dDcTeBNNnypEWXPNG8Xac1JQXCTfVkORfvi0=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "openomf";
version = "0.8.5";
version = "0.8.6";
src = fetchFromGitHub {
owner = "omf2097";
repo = "openomf";
tag = finalAttrs.version;
hash = "sha256-5X8drQKMwYZ5M/i7hxyI25AysQGedQ5BLEYcNXWHgNk=";
hash = "sha256-KzT2leU52nxUIsuiVM5soWmi+x1LStdxY5JLoCkSSb8=";
};
postPatch = ''
# TODO: Take this upstream
substituteInPlace cmake-scripts/version.cmake \
--replace-fail "set(VERSION_MAJOR 0)" "set(VERSION_MAJOR ${lib.versions.major finalAttrs.version})" \
--replace-fail "set(VERSION_MINOR 0)" "set(VERSION_MINOR ${lib.versions.minor finalAttrs.version})" \
--replace-fail "set(VERSION_PATCH 0)" "set(VERSION_PATCH ${lib.versions.patch finalAttrs.version})" \
--replace-fail "set(VERSION_LABEL)" "set(VERSION_LABEL)
return()"
substituteInPlace src/resources/resource_paths.c \
--replace-fail \
"/usr/local/share/games:/usr/share/games:/usr/local/share:/usr/share" \
"$out/share/games"
'';
nativeBuildInputs = [
cmake
git
unzip
];
@@ -69,7 +82,11 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
mkdir -p $out/share/icons/hicolor/256x256/apps
unzip -j ${assets} -d $out/share/games/openomf
unzip -j ${assets} -d $out/share/games/openomf/resources
unzip ${musicRemixes} -d $out/share/games/openomf/mods
unzip -p ${icons} omf-logo/omf-256x256.png > $out/share/icons/hicolor/256x256/apps/org.openomf.OpenOMF.png
install -Dm644 $src/resources/flatpak/org.openomf.OpenOMF.desktop $out/share/applications/org.openomf.OpenOMF.desktop
''