summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2021-07-26 20:05:00 +0200
committerSander van der Burg <svanderburg@gmail.com>2021-07-26 23:31:31 +0200
commitde9913708c019a18adce74f6ecb143073fdbbec2 (patch)
tree02b1a0853149b9adfa4c3dfab209a6143b5a8139 /pkgs
parente1533b22aff443e2b021d6ac437f0d5dacf7a745 (diff)
downloadnixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar.gz
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar.bz2
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar.lz
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar.xz
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.tar.zst
nixpkgs-de9913708c019a18adce74f6ecb143073fdbbec2.zip
ecwolf: init at 1.3.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/games/ecwolf/default.nix52
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/games/ecwolf/default.nix b/pkgs/games/ecwolf/default.nix
new file mode 100644
index 00000000000..519398a738b
--- /dev/null
+++ b/pkgs/games/ecwolf/default.nix
@@ -0,0 +1,52 @@
+{stdenv, lib, fetchurl, makeDesktopItem, copyDesktopItems, cmake, pkg-config, zlib, bzip2, libjpeg, SDL, SDL_mixer, gtk2}:
+
+let
+  desktopItem = makeDesktopItem {
+    name = "ecwolf";
+    exec = "ecwolf";
+    comment = "Enhanced Wolfenstein 3D port";
+    desktopName = "Wolfenstein 3D";
+    categories = "Game;";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "ecwolf";
+  version = "1.3.3";
+
+  src = fetchurl {
+    url = "https://maniacsvault.net/ecwolf/files/ecwolf/1.x/${pname}-${version}-src.tar.xz";
+    sha256 = "1sbdv672dz47la5a5qwmdi1v258k9kc5dkx7cdj2b6gk8nbm2srl";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [ zlib bzip2 libjpeg SDL SDL_mixer gtk2 copyDesktopItems ];
+
+  desktopItems = [ desktopItem ];
+
+  # 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
+  '';
+
+  # 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/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ sander ];
+    # Darwin is untested (supported by upstream)
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f8010f151bb..55b98b56700 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -28909,6 +28909,8 @@ in
 
   eboard = callPackage ../games/eboard { };
 
+  ecwolf = callPackage ../games/ecwolf { };
+
   eduke32 = callPackage ../games/eduke32 { };
 
   egoboo = callPackage ../games/egoboo { };