etlegacy-unwrapped: 2.83.2 -> 2.84.0

This commit is contained in:
Pol Dellaiera
2026-06-01 17:04:28 +02:00
parent c8560a2e8a
commit 268daa4750
2 changed files with 35 additions and 6 deletions

View File

@@ -21,26 +21,36 @@
zlib,
}:
let
version = "2.83.2";
version = "2.84.0";
fakeGit = writeScriptBin "git" ''
if [ "$1" = "describe" ]; then
echo "${version}"
fi
'';
binarySuffix =
if stdenv.hostPlatform.isx86_64 then
"x86_64"
else if stdenv.hostPlatform.isAarch64 then
"aarch64"
else if stdenv.hostPlatform.isi686 then
"386"
else
throw "Unsupported architecture: ${stdenv.hostPlatform.system}";
in
stdenv.mkDerivation {
pname = "etlegacy-unwrapped";
inherit version;
__structuredAttrs = true;
strictDeps = true;
src = fetchFromGitHub {
owner = "etlegacy";
repo = "etlegacy";
tag = "v${version}";
hash = "sha256-hZwLYaYV0j3YwFi8KRr4DZV73L2yIwFJ3XqCyq6L7hE=";
hash = "sha256-E1eR0OIfXn2QkSGYNu1JFXDIVrkz+pxM7IU0GVkvAFQ=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
fakeGit
@@ -69,6 +79,9 @@ stdenv.mkDerivation {
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
(lib.cmakeBool "BUILD_SERVER" true)
(lib.cmakeBool "BUILD_CLIENT" true)
(lib.cmakeBool "BUNDLED_WOLFSSL" false)
(lib.cmakeBool "BUNDLED_OPENSSL" false)
(lib.cmakeBool "BUNDLED_CURL" false)
(lib.cmakeBool "BUNDLED_ZLIB" false)
(lib.cmakeBool "BUNDLED_CJSON" false)
(lib.cmakeBool "BUNDLED_JPEG" false)
@@ -86,8 +99,11 @@ stdenv.mkDerivation {
(lib.cmakeBool "INSTALL_OMNIBOT" false)
(lib.cmakeBool "INSTALL_GEOIP" false)
(lib.cmakeBool "INSTALL_WOLFADMIN" false)
(lib.cmakeBool "FEATURE_FREETYPE" true)
(lib.cmakeBool "FEATURE_GETTEXT" true)
(lib.cmakeBool "FEATURE_AUTOUPDATE" false)
(lib.cmakeBool "FEATURE_RENDERER2" false)
(lib.cmakeBool "RENDERER_DYNAMIC" true)
(lib.cmakeFeature "INSTALL_DEFAULT_BASEDIR" "${placeholder "out"}/lib/etlegacy")
(lib.cmakeFeature "INSTALL_DEFAULT_BINDIR" "${placeholder "out"}/bin")
];
@@ -104,5 +120,7 @@ stdenv.mkDerivation {
maintainers = with lib.maintainers; [
ashleyghooper
];
mainProgram = "etl." + binarySuffix;
platforms = lib.platforms.linux;
};
}

View File

@@ -7,9 +7,20 @@
makeBinaryWrapper,
}:
let
binarySuffix =
if stdenv.hostPlatform.isx86_64 then
"x86_64"
else if stdenv.hostPlatform.isAarch64 then
"aarch64"
else if stdenv.hostPlatform.isi686 then
"386"
else
throw "Unsupported architecture: ${stdenv.hostPlatform.system}";
in
symlinkJoin {
pname = "etlegacy";
version = "2.83.2";
version = "2.84.0";
paths = [
etlegacy-assets
@@ -39,7 +50,7 @@ symlinkJoin {
for the popular online FPS game Wolfenstein: Enemy Territory - whose
gameplay is still considered unmatched by many, despite its great age.
'';
mainProgram = "etl." + (if stdenv.hostPlatform.isi686 then "i386" else "x86_64");
mainProgram = "etl." + binarySuffix;
maintainers = with lib.maintainers; [
ashleyghooper
];