summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2023-02-16 22:26:59 +0100
committerGitHub <noreply@github.com>2023-02-16 22:26:59 +0100
commitf6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6 (patch)
tree1c23dcc37f90819c0a0c925a538d3ee0200ad399
parent92c9c2638c5d730107dea45ac224485e9e44de15 (diff)
parent6cf19065ad9e5e8663ef11450d44079c8bbf34bc (diff)
downloadnixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar.gz
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar.bz2
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar.lz
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar.xz
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.tar.zst
nixpkgs-f6f6796bc9738c6f29fb7ffc4a5f7d26614f7cc6.zip
Merge pull request #215428 from devusb/theforceengine
-rw-r--r--pkgs/games/theforceengine/default.nix52
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/games/theforceengine/default.nix b/pkgs/games/theforceengine/default.nix
new file mode 100644
index 00000000000..ffc9811e869
--- /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" ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index afbfd25f39d..22b10fdd2af 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -35770,6 +35770,8 @@ with pkgs;
     inherit (darwin.apple_sdk.frameworks) Cocoa;
   };
 
+  theforceengine = callPackage ../games/theforceengine { };
+
   tbe = libsForQt5.callPackage ../games/the-butterfly-effect { };
 
   tbls = callPackage ../tools/misc/tbls { };