summaryrefslogtreecommitdiff
path: root/pkgs/xash3d.nix
blob: f0c1f4091d3cd40857fd153ce36f6f0b4ec76814 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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"];
  };
})