bzflag: Move to by-name

bzflag: Update source URL to use finalAttrs for versioning

bzflag: Remove unused dependencies Carbon and CoreServices

switch to pname

Change to recursive finalattrs to pick up pname and version.
This commit is contained in:
Guy Chronister 2025-04-01 08:56:58 -05:00 committed by Weijia Wang
parent 9affa90adf
commit 483c48d27b
3 changed files with 43 additions and 53 deletions

View File

@ -0,0 +1,43 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
curl,
SDL2,
libGLU,
libGL,
glew,
ncurses,
c-ares,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bzflag";
version = "2.4.30";
src = fetchurl {
url = "https://download.bzflag.org/bzflag/source/${finalAttrs.version}/bzflag-${finalAttrs.version}.tar.bz2";
sha256 = "sha256-u3i3UOe856p8Eb01kGuwikmsx8UL8pYprzgO7NFTiU0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
curl
SDL2
libGLU
libGL
glew
ncurses
c-ares
];
meta = {
description = "Multiplayer 3D Tank game";
homepage = "https://bzflag.org/";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.unix;
maintainers = [ ];
};
})

View File

@ -1,49 +0,0 @@
{
stdenv,
lib,
fetchurl,
pkg-config,
curl,
SDL2,
libGLU,
libGL,
glew,
ncurses,
c-ares,
Carbon,
CoreServices,
}:
stdenv.mkDerivation rec {
pname = "bzflag";
version = "2.4.30";
src = fetchurl {
url = "https://download.bzflag.org/${pname}/source/${version}/${pname}-${version}.tar.bz2";
sha256 = "sha256-u3i3UOe856p8Eb01kGuwikmsx8UL8pYprzgO7NFTiU0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs =
[
curl
SDL2
libGLU
libGL
glew
ncurses
c-ares
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon
CoreServices
];
meta = with lib; {
description = "Multiplayer 3D Tank game";
homepage = "https://bzflag.org/";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
maintainers = [ ];
};
}

View File

@ -17262,10 +17262,6 @@ with pkgs;
inherit (darwin.apple_sdk_11_0.frameworks) IOKit Foundation OpenGL;
};
bzflag = callPackage ../games/bzflag {
inherit (darwin.apple_sdk.frameworks) Carbon CoreServices;
};
cataclysmDDA = callPackage ../games/cataclysm-dda { };
cataclysm-dda = cataclysmDDA.stable.tiles;