eduke32: automatically update VC_REV, add update script, remove gtk2 (#410876)

This commit is contained in:
Peder Bergebakken Sundt
2025-06-05 19:23:55 +02:00
committed by GitHub

View File

@@ -9,13 +9,14 @@
copyDesktopItems,
alsa-lib,
flac,
gtk2,
libvorbis,
libvpx,
libGL,
SDL2,
SDL2_mixer,
xorg,
graphicsmagick,
unstableGitUpdater,
}:
let
@@ -33,7 +34,14 @@ stdenv.mkDerivation (finalAttrs: {
owner = "terminx";
repo = "eduke32";
rev = "b8759847124c2c53a165a02efef4a0c778674baf";
hash = "sha256-PudO6EKCh6UpoY6GT/J0hkVteKNIAO4Q454jIzaegMg=";
hash = "sha256-+XaIoCP6TA5QMzs/VxXIv1NP8X4i9rIm6iw+pFH8Q6Q=";
deepClone = true;
leaveDotGit = true;
postFetch = ''
cd $out
git rev-list --count HEAD > VC_REV
rm -rf .git
'';
};
patches = [
@@ -52,8 +60,8 @@ stdenv.mkDerivation (finalAttrs: {
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
gtk2
libGL
xorg.libX11
];
nativeBuildInputs =
@@ -83,10 +91,9 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [
"SDLCONFIG=${SDL2}/bin/sdl2-config"
# git rev-list --count HEAD
"VC_REV=10619"
"VC_HASH=${lib.substring 0 9 finalAttrs.src.rev}"
"VC_BRANCH=master"
"HAVE_GTK2=0"
];
buildFlags = [
@@ -94,6 +101,10 @@ stdenv.mkDerivation (finalAttrs: {
"sw"
];
preConfigure = ''
appendToVar makeFlags "VC_REV=$(cat VC_REV)"
'';
desktopItems = [
(makeDesktopItem {
name = "eduke32";
@@ -169,6 +180,8 @@ stdenv.mkDerivation (finalAttrs: {
runHook postInstall
'';
passthru.updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
meta = {
description = "Enhanched port of Duke Nukem 3D for various platforms";
homepage = "http://eduke32.com";