16 stdenv.mkDerivation rec {
20 src = fetchFromBitbucket {
24 sha256 = "V2pSP8i20zB50WtUMujzij+ISSupdQQ/oCYYrOaTU1g=";
27 nativeBuildInputs = [ cmake pkg-config ]
28 ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ];
29 buildInputs = [ zlib bzip2 libjpeg SDL2 SDL2_net SDL2_mixer gtk3 ];
31 NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit";
33 # ECWolf installs its binary to the games/ directory, but Nix only adds bin/
34 # directories to the PATH.
35 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
36 mv "$out/games" "$out/bin"
37 '' + lib.optionalString stdenv.hostPlatform.isDarwin ''
38 mkdir -p $out/{Applications,bin}
39 cp -R ecwolf.app $out/Applications
40 makeWrapper $out/{Applications/ecwolf.app/Contents/MacOS,bin}/ecwolf
44 description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms";
45 mainProgram = "ecwolf";
46 homepage = "https://maniacsvault.net/ecwolf/";
47 license = licenses.gpl2Plus;
48 maintainers = with maintainers; [ jayman2000 sander ];
49 platforms = platforms.all;