about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorGuillaume Girol <symphorien@users.noreply.github.com>2023-02-04 20:09:01 +0000
committerGitHub <noreply@github.com>2023-02-04 20:09:01 +0000
commit12c5a18083da18ac4253b158ab5a0eb51cd134a7 (patch)
treebd6d8b917d5e37de2afc67894a0efa5fd71878ea /pkgs
parent1fb588ebd0fb5e2094ba1ac979f4a23ca2c962c8 (diff)
parentd3bb475232cc332605e58c6bb74741bb057f6257 (diff)
Merge pull request #213856 from Jayman2000/ecwolf-obsolete-build-steps
ecwolf: remove obsolete build steps & fix executable not being added to `PATH`
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/games/ecwolf/default.nix31
1 files changed, 5 insertions, 26 deletions
diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix
index 40b06d88269bb..34c186f7f2dcf 100644
--- a/pkgs/games/ecwolf/default.nix
+++ b/pkgs/games/ecwolf/default.nix
@@ -28,43 +28,22 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ cmake copyDesktopItems pkg-config ];
   buildInputs = [ zlib bzip2 libjpeg SDL2 SDL2_net SDL2_mixer gtk3 ];
 
-  desktopItems = [
-    (makeDesktopItem {
-      name = "ecwolf";
-      exec = "ecwolf";
-      comment = "Enhanced Wolfenstein 3D port";
-      desktopName = "Wolfenstein 3D";
-      categories = [ "Game" ];
-    })
-  ];
-
-  # Change the location where the ecwolf executable looks for the ecwolf.pk3
-  # file.
-  #
-  # By default, it expects the PK3 file to reside in the same directory as the
-  # executable, which is not desirable.
-  # We will adjust the code so that it can be retrieved from the share/
-  # directory.
-
-  preConfigure = ''
-    sed -i -e "s|ecwolf.pk3|$out/share/ecwolf/ecwolf.pk3|" src/version.h
-  ''
   # Disable app bundle creation on Darwin. It fails, and it is not needed to run it from the Nix store
-  + lib.optionalString stdenv.isDarwin ''
+  preConfigure = lib.optionalString stdenv.isDarwin ''
     sed -i -e "s|include(\''${CMAKE_CURRENT_SOURCE_DIR}/macosx/install.txt)||" src/CMakeLists.txt
   '';
 
-  # Install the required PK3 file in the required data directory
+  # ECWolf installs its binary to the games/ directory, but Nix only adds bin/
+  # directories to the PATH.
   postInstall = ''
-    mkdir -p $out/share/ecwolf
-    cp ecwolf.pk3 $out/share/ecwolf
+    mv "$out/games" "$out/bin"
   '';
 
   meta = with lib; {
     description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms";
     homepage = "https://maniacsvault.net/ecwolf/";
     license = licenses.gpl2Plus;
-    maintainers = with maintainers; [ sander ];
+    maintainers = with maintainers; [ jayman2000 sander ];
     platforms = platforms.all;
     # On Darwin, the linker fails to find a bunch of symbols.
     broken = stdenv.isDarwin;