summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/default.nix1
-rw-r--r--pkgs/xash3d.nix61
2 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 4713d6c..04eb4da 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -50,5 +50,6 @@ in
(lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") {
tcmalloc-tf2 = gperftools.override {inherit (pkgsi686Linux.llvmPackages_16) stdenv;};
+ xash3d = pkgsi686Linux.callPackage ./xash3d.nix {};
})
]
diff --git a/pkgs/xash3d.nix b/pkgs/xash3d.nix
new file mode 100644
index 0000000..f0c1f40
--- /dev/null
+++ b/pkgs/xash3d.nix
@@ -0,0 +1,61 @@
+{
+ lib,
+ stdenv,
+ ensureNewerSourcesForZipFilesHook,
+ fetchFromGitHub,
+ fontconfig,
+ freetype,
+ libopus,
+ pkg-config,
+ python3,
+ SDL2,
+ waf,
+}:
+stdenv.mkDerivation (finalAttrs: {
+ pname = "xash3d";
+ version = "unstable-2024-01-15";
+
+ src = fetchFromGitHub {
+ owner = "FWGS";
+ repo = "xash3d-fwgs";
+ rev = "40041e30eb0dd93b6484c2b0057b21e3b70c15e3";
+ hash = "sha256-6d5b4eewZIyk5ybhVIwrAslEnSKnPKqjWlvQWeMM1zU=";
+ fetchSubmodules = true;
+ };
+
+ preConfigure = ''
+ rm -rf 3rdparty/opus/opus
+ ln -s ${libopus.src} 3rdparty/opus/opus
+ '';
+
+ buildInputs = [
+ fontconfig
+ freetype
+ SDL2
+ libopus
+ ];
+
+ nativeBuildInputs = [
+ pkg-config
+ python3
+ ensureNewerSourcesForZipFilesHook
+ waf.hook
+ ];
+
+ wafInstallFlags = "--destdir=/";
+
+ meta = with lib; {
+ description = "A game engine aimed to provide compatibility with Half-Life Engine and extend it";
+ longDescription = ''
+ Xash3D FWGS is a game engine, aimed to provide compatibility with Half-Life Engine and extend it, as well as to give game developers well known workflow.
+
+ Xash3D FWGS is a heavily modified fork of an original Xash3D Engine by Unkle Mike.
+ '';
+ homepage = "https://github.com/FWGS/xash3d-fwgs";
+ # this has a lot of licensing issues...best to play it safe
+ # see https://github.com/FWGS/xash3d-fwgs/issues/63
+ license = with licenses; unfree;
+ maintainers = with maintainers; [getchoo];
+ platforms = ["x86_64-linux" "i686-linux"];
+ };
+})