Skip to content

Commit 421028d

Browse files
authored
eternity: 4.02.00 -> 4.05.04 (NixOS#462047)
2 parents 6621eb0 + 4ed09e6 commit 421028d

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed

pkgs/by-name/et/eternity/package.nix

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,66 @@
88
SDL2_net,
99
fetchFromGitHub,
1010
makeWrapper,
11+
zlib,
1112
}:
1213

13-
stdenv.mkDerivation rec {
14+
stdenv.mkDerivation (finalAttrs: {
1415
pname = "eternity-engine";
15-
version = "4.02.00";
16+
version = "4.05.04";
1617
src = fetchFromGitHub {
1718
owner = "team-eternity";
1819
repo = "eternity";
19-
tag = version;
20-
sha256 = "0dlz7axbiw003bgwk2hl43w8r2bwnxhi042i1xwdiwaja0cpnf5y";
20+
tag = finalAttrs.version;
21+
hash = "sha256-uUQYTI6qDMMtL0Zc82wr3hOPayvAj5kH8CuexAKFE6I=";
2122
fetchSubmodules = true;
2223
};
2324

25+
postPatch =
26+
# CMake 4 compatibility
27+
''
28+
substituteInPlace acsvm/CMakeLists.txt \
29+
--replace-fail 'cmake_minimum_required(VERSION 2.6)' 'cmake_minimum_required(VERSION 3.10)'
30+
31+
substituteInPlace zlib/CMakeLists.txt \
32+
--replace-fail 'cmake_minimum_required(VERSION 2.4.4)' 'cmake_minimum_required(VERSION 3.10)'
33+
34+
substituteInPlace snes_spc/CMakeLists.txt \
35+
--replace-fail 'CMAKE_MINIMUM_REQUIRED (VERSION 2.4)' 'cmake_minimum_required(VERSION 3.10)'
36+
37+
substituteInPlace libpng/CMakeLists.txt \
38+
--replace-fail 'cmake_minimum_required(VERSION 3.1)' 'cmake_minimum_required(VERSION 3.10)' \
39+
--replace-fail 'cmake_policy(VERSION 3.1)' 'cmake_policy(VERSION 3.10)'
40+
41+
substituteInPlace adlmidi/libADLMIDI.pc.in \
42+
--replace-fail 'libdir=''${exec_prefix}/@CMAKE_INSTALL_LIBDIR@' 'libdir=@CMAKE_INSTALL_FULL_LIBDIR@' \
43+
--replace-fail 'includedir=''${prefix}/@CMAKE_INSTALL_INCLUDEDIR@' 'libdir=@CMAKE_INSTALL_FULL_INCLUDEDIR@'
44+
''
45+
+
46+
# Find installed 'base' data directory
47+
''
48+
substituteInPlace source/hal/i_directory.cpp \
49+
--replace-fail '/usr/local/share/eternity/base' "$out/share/eternity/base"
50+
'';
51+
2452
nativeBuildInputs = [
2553
cmake
2654
makeWrapper
2755
];
56+
2857
buildInputs = [
2958
libGL
3059
SDL2
3160
SDL2_mixer
3261
SDL2_net
62+
zlib
3363
];
3464

35-
installPhase = ''
36-
install -Dm755 eternity/eternity $out/lib/eternity/eternity
37-
cp -r $src/base $out/lib/eternity/base
38-
mkdir $out/bin
39-
makeWrapper $out/lib/eternity/eternity $out/bin/eternity
40-
'';
41-
4265
meta = {
4366
homepage = "https://doomworld.com/eternity";
4467
description = "New school Doom port by James Haley";
4568
mainProgram = "eternity";
4669
license = lib.licenses.gpl3;
4770
platforms = lib.platforms.linux;
48-
maintainers = [ ];
71+
maintainers = with lib.maintainers; [ aware70 ];
4972
};
50-
}
73+
})

0 commit comments

Comments
 (0)