1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00

Merge pull request #318921 from qubitnano/raze

raze: init at 1.10.2
This commit is contained in:
Azat Bahawi 2024-07-01 08:12:25 +00:00 committed by GitHub
commit 71117df324
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
ninja,
SDL2,
zmusic,
libvpx,
pkg-config,
makeWrapper,
bzip2,
gtk3,
fluidsynth,
openal,
libGL,
vulkan-loader,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "raze";
version = "1.10.2";
src = fetchFromGitHub {
owner = "ZDoom";
repo = "Raze";
rev = finalAttrs.version;
hash = "sha256-R3Sm/cibg+D2QPS4UisRp91xvz3Ine2BUR8jF5Rbj1g=";
leaveDotGit = true;
postFetch = ''
cd $out
git rev-parse HEAD > COMMIT
rm -rf .git
'';
};
nativeBuildInputs = [
cmake
ninja
pkg-config
makeWrapper
];
buildInputs = [
SDL2
zmusic
libvpx
bzip2
gtk3
fluidsynth
openal
libGL
vulkan-loader
];
cmakeFlags = [
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
(lib.cmakeBool "DYN_GTK" false)
(lib.cmakeBool "DYN_OPENAL" false)
];
postPatch = ''
substituteInPlace tools/updaterevision/gitinfo.h.in \
--replace-fail "@Tag@" "${finalAttrs.version}" \
--replace-fail "@Hash@" "$(cat COMMIT)" \
--replace-fail "@Timestamp@" "1970-01-01 00:00:01 +0000"
'';
postInstall = ''
mv $out/bin/raze $out/share/raze
makeWrapper $out/share/raze/raze $out/bin/raze
install -Dm644 ../source/platform/posix/org.zdoom.Raze.256.png $out/share/pixmaps/org.zdoom.Raze.png
install -Dm644 ../source/platform/posix/org.zdoom.Raze.desktop $out/share/applications/org.zdoom.Raze.desktop
install -Dm644 ../soundfont/raze.sf2 $out/share/raze/soundfonts/raze.sf2
'';
meta = {
description = "Build engine port backed by GZDoom tech";
longDescription = ''
Raze is a fork of Build engine games backed by GZDoom tech and combines
Duke Nukem 3D, Blood, Redneck Rampage, Shadow Warrior and Exhumed/Powerslave
in a single package. It is also capable of playing Nam and WW2 GI.
'';
homepage = "https://github.com/ZDoom/Raze";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ qubitnano ];
mainProgram = "raze";
platforms = [ "x86_64-linux" ];
};
})