3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/games/ecwolf/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, fetchFromBitbucket
, cmake
2023-02-06 15:05:19 +00:00
, copyDesktopItems
, pkg-config
2023-02-06 15:05:19 +00:00
, makeWrapper
, zlib
, bzip2
, libjpeg
, SDL2
, SDL2_net
, SDL2_mixer
, gtk3
}:
2021-08-09 10:28:34 +01:00
2021-07-26 19:05:00 +01:00
stdenv.mkDerivation rec {
pname = "ecwolf";
version = "1.4.1";
2021-07-26 19:05:00 +01:00
src = fetchFromBitbucket {
owner = pname;
repo = pname;
rev = version;
sha256 = "V2pSP8i20zB50WtUMujzij+ISSupdQQ/oCYYrOaTU1g=";
2021-07-26 19:05:00 +01:00
};
2023-02-06 15:05:19 +00:00
nativeBuildInputs = [ cmake copyDesktopItems pkg-config ]
++ lib.optionals stdenv.isDarwin [ makeWrapper ];
buildInputs = [ zlib bzip2 libjpeg SDL2 SDL2_net SDL2_mixer gtk3 ];
2021-07-26 19:05:00 +01:00
2023-02-06 15:05:19 +00:00
NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-framework AppKit";
2021-07-26 19:05:00 +01:00
# ECWolf installs its binary to the games/ directory, but Nix only adds bin/
# directories to the PATH.
2023-02-06 15:05:19 +00:00
postInstall = lib.optionalString stdenv.isLinux ''
mv "$out/games" "$out/bin"
2023-02-06 15:05:19 +00:00
'' + lib.optionalString stdenv.isDarwin ''
mkdir -p $out/{Applications,bin}
cp -R ecwolf.app $out/Applications
makeWrapper $out/{Applications/ecwolf.app/Contents/MacOS,bin}/ecwolf
'';
2021-07-26 19:05:00 +01:00
meta = with lib; {
description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms";
homepage = "https://maniacsvault.net/ecwolf/";
license = licenses.gpl2Plus;
2023-01-31 21:17:56 +00:00
maintainers = with maintainers; [ jayman2000 sander ];
2021-07-26 19:05:00 +01:00
platforms = platforms.all;
};
}