about summary refs log tree commit diff
path: root/pkgs/games/theforceengine
diff options
context:
space:
mode:
authorMorgan Helton <mhelton@gmail.com>2023-02-08 20:19:55 -0600
committerMorgan Helton <mhelton@gmail.com>2023-02-16 14:51:31 -0600
commit6cf19065ad9e5e8663ef11450d44079c8bbf34bc (patch)
tree26f7a2a8f77eeb75ae7e315b27097165bf8db5c7 /pkgs/games/theforceengine
parentaca7f653efd094023d6f0aec9415e03ab157159a (diff)
theforceengine: init at 1.09.100
Diffstat (limited to 'pkgs/games/theforceengine')
-rw-r--r--pkgs/games/theforceengine/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/games/theforceengine/default.nix b/pkgs/games/theforceengine/default.nix
new file mode 100644
index 0000000000000..ffc9811e869e0
--- /dev/null
+++ b/pkgs/games/theforceengine/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, SDL2
+, libdevil
+, rtaudio
+, rtmidi
+, glew
+, alsa-lib
+, cmake
+, pkg-config
+}:
+
+stdenv.mkDerivation rec {
+  pname = "theforceengine";
+  version = "1.09.100";
+
+  src = fetchFromGitHub {
+    owner = "luciusDXL";
+    repo = "TheForceEngine";
+    rev = "v${version}";
+    sha256 = "sha256-nw9yp/StaSi5thafVT1V5YA2ZCYGWNoHUvQTpK90Foc=";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+  ];
+
+  buildInputs = [
+    SDL2
+    libdevil
+    rtaudio
+    rtmidi
+    glew
+    alsa-lib
+  ];
+
+  prePatch = ''
+    # use nix store path instead of hardcoded /usr/share for support data
+    substituteInPlace TheForceEngine/TFE_FileSystem/paths-posix.cpp \
+      --replace "/usr/share" "$out/share"
+  '';
+
+  meta = with lib; {
+    description = "Modern \"Jedi Engine\" replacement supporting Dark Forces, mods, and in the future Outlaws.";
+    homepage = "https://theforceengine.github.io";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ devusb ];
+    platforms = [ "x86_64-linux" ];
+  };
+}