Merge pull request #185825 from necrophcodr/add-fteqw
fteqw: init at unstable-2022-08-09
This commit is contained in:
commit
4bb451da7d
90
pkgs/games/fteqw/default.nix
Normal file
90
pkgs/games/fteqw/default.nix
Normal file
@ -0,0 +1,90 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchsvn
|
||||
, gzip
|
||||
, libvorbis
|
||||
, libmad
|
||||
, SDL2
|
||||
, SDL2_mixer
|
||||
, libpng
|
||||
, alsa-lib
|
||||
, gnutls
|
||||
, zlib
|
||||
, libjpeg
|
||||
, vulkan-loader
|
||||
, vulkan-headers
|
||||
, speex
|
||||
, libopus
|
||||
, xorg
|
||||
, libGL
|
||||
}@attrs:
|
||||
{
|
||||
fteqw = import ./generic.nix (rec {
|
||||
pname = "fteqw";
|
||||
|
||||
buildFlags = [ "m-rel" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
vulkan-headers
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gzip
|
||||
libvorbis
|
||||
libmad
|
||||
SDL2
|
||||
SDL2_mixer
|
||||
libpng
|
||||
alsa-lib
|
||||
gnutls
|
||||
libjpeg
|
||||
vulkan-loader
|
||||
speex
|
||||
libopus
|
||||
xorg.libXrandr
|
||||
xorg.libXcursor
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
patchelf $out/bin/${pname} \
|
||||
--add-needed ${SDL2}/lib/libSDL2.so \
|
||||
--add-needed ${libGL}/lib/libGLX.so \
|
||||
--add-needed ${libGL}/lib/libGL.so \
|
||||
--add-needed ${lib.getLib gnutls}/lib/libgnutls.so \
|
||||
--add-needed ${vulkan-loader}/lib/libvulkan.so
|
||||
'';
|
||||
|
||||
description = "A hybrid and versatile game engine";
|
||||
} // attrs);
|
||||
|
||||
fteqw-dedicated = import ./generic.nix (rec {
|
||||
pname = "fteqw-dedicated";
|
||||
releaseFile = "fteqw-sv";
|
||||
|
||||
buildFlags = [ "sv-rel" ];
|
||||
|
||||
buildInputs = [
|
||||
gnutls
|
||||
zlib
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
patchelf $out/bin/${pname} \
|
||||
--add-needed ${gnutls}/lib/libgnutls.so \
|
||||
'';
|
||||
|
||||
description = "Dedicated server for FTEQW";
|
||||
} // attrs);
|
||||
|
||||
fteqcc = import ./generic.nix ({
|
||||
pname = "fteqcc";
|
||||
|
||||
buildFlags = [ "qcc-rel" ];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
];
|
||||
|
||||
description = "User friendly QuakeC compiler";
|
||||
} // attrs);
|
||||
}
|
60
pkgs/games/fteqw/generic.nix
Normal file
60
pkgs/games/fteqw/generic.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ lib
|
||||
, fetchsvn
|
||||
, stdenv
|
||||
, libopus
|
||||
, xorg
|
||||
, pname
|
||||
, releaseFile ? pname
|
||||
, buildFlags
|
||||
, buildInputs
|
||||
, nativeBuildInputs ? []
|
||||
, postFixup ? ""
|
||||
, description
|
||||
, ... }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
inherit pname buildFlags buildInputs nativeBuildInputs postFixup;
|
||||
version = "unstable-2022-08-09";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "https://svn.code.sf.net/p/fteqw/code/trunk";
|
||||
rev = "6303";
|
||||
sha256 = "sha256-tSTFX59iVUvndPRdREayKpkQ+YCYKCMQe2PXZfnTgPQ=";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"PKGCONFIG=$(PKG_CONFIG)"
|
||||
"-C" "engine"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
postPatch = ''
|
||||
substituteInPlace ./engine/Makefile \
|
||||
--replace "I/usr/include/opus" "I${libopus.dev}/include/opus"
|
||||
substituteInPlace ./engine/gl/gl_vidlinuxglx.c \
|
||||
--replace 'Sys_LoadLibrary("libXrandr"' 'Sys_LoadLibrary("${xorg.libXrandr}/lib/libXrandr.so"'
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 engine/release/${releaseFile} $out/bin/${pname}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit description;
|
||||
homepage = "https://fte.triptohell.info";
|
||||
longDescription = ''
|
||||
FTE is a game engine baed on QuakeWorld able to
|
||||
play games such as Quake 1, 2, 3, and Hexen 2.
|
||||
It includes various features such as extended map
|
||||
limits, vulkan and OpenGL renderers, a dedicated
|
||||
server, and fteqcc, for easier QuakeC development
|
||||
'';
|
||||
maintainers = with maintainers; [ necrophcodr ];
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
@ -36820,6 +36820,11 @@ with pkgs;
|
||||
|
||||
freenukum = callPackage ../games/freenukum { };
|
||||
|
||||
inherit (callPackages ../games/fteqw {})
|
||||
fteqw
|
||||
fteqw-dedicated
|
||||
fteqcc;
|
||||
|
||||
gamepad-tool = callPackage ../games/gamepad-tool { };
|
||||
|
||||
gnome-hexgl = callPackage ../games/gnome-hexgl { };
|
||||
|
Loading…
Reference in New Issue
Block a user