From 1aa9ce67f0b9fffa2a38daefa85f26abf3fa6540 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Tue, 31 Jan 2023 13:28:08 -0500 Subject: ecwolf: remove obsolete build steps ECWolf 1.4.0 made several changes that make it easier for Linux distros to create packages for ECWolf [1]. ECWolf now generates its own desktop shortcut, so we no longer need to use makeDesktopItem. ECWolf now also will look in the CMAKE_INSTALL_PREFIX/share/ecwolf directory for ecwolf.pk3, so we no longer need to patch src/version.h or copy ecwolf.pk3 manually. [1]: https://bitbucket.org/ecwolf/ecwolf/commits/55a28ec7e141b6ea1833aa3604e8e03236f873f4 --- pkgs/games/ecwolf/default.nix | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'pkgs') diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix index 40b06d88269bb..e4da23d2fbcc6 100644 --- a/pkgs/games/ecwolf/default.nix +++ b/pkgs/games/ecwolf/default.nix @@ -28,38 +28,11 @@ 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 - postInstall = '' - mkdir -p $out/share/ecwolf - cp ecwolf.pk3 $out/share/ecwolf - ''; - meta = with lib; { description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms"; homepage = "https://maniacsvault.net/ecwolf/"; -- cgit 1.4.1 From 774420e45690b5b3fc46e93e1752ee101fdc455e Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Tue, 31 Jan 2023 16:17:56 -0500 Subject: ecwolf: add jayman2000 as maintainer --- pkgs/games/ecwolf/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkgs') diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix index e4da23d2fbcc6..b5f0c5152c181 100644 --- a/pkgs/games/ecwolf/default.nix +++ b/pkgs/games/ecwolf/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { 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; -- cgit 1.4.1 From d3bb475232cc332605e58c6bb74741bb057f6257 Mon Sep 17 00:00:00 2001 From: Jason Yundt Date: Sat, 4 Feb 2023 13:11:54 -0500 Subject: ecwolf: fix executable not being added to PATH Co-authored-by: Guillaume Girol --- pkgs/games/ecwolf/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'pkgs') diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix index b5f0c5152c181..34c186f7f2dcf 100644 --- a/pkgs/games/ecwolf/default.nix +++ b/pkgs/games/ecwolf/default.nix @@ -33,6 +33,12 @@ stdenv.mkDerivation rec { sed -i -e "s|include(\''${CMAKE_CURRENT_SOURCE_DIR}/macosx/install.txt)||" src/CMakeLists.txt ''; + # ECWolf installs its binary to the games/ directory, but Nix only adds bin/ + # directories to the PATH. + postInstall = '' + mv "$out/games" "$out/bin" + ''; + meta = with lib; { description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms"; homepage = "https://maniacsvault.net/ecwolf/"; -- cgit 1.4.1