nixpkgs-suyu/pkgs/games/blobwars/default.nix
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00

34 lines
1.2 KiB
Nix

{ stdenv, lib, fetchurl, pkg-config, gettext, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf, zlib }:
stdenv.mkDerivation rec {
pname = "blobwars";
version = "2.00";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
};
nativeBuildInputs = [ pkg-config gettext ];
buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
makeFlags = [ "PREFIX=$(out)" "RELEASE=1" ];
postInstall = ''
install -Dm755 $out/games/blobwars -t $out/bin
rm -r $out/games
cp -r {data,gfx,sound,music} $out/share/games/blobwars/
# fix world readable bit
find $out/share/games/blobwars/. -type d -exec chmod 755 {} +
find $out/share/games/blobwars/. -type f -exec chmod 644 {} +
'';
meta = with lib; {
description = "Platform action game featuring a blob with lots of weapons";
homepage = "https://www.parallelrealities.co.uk/games/metalBlobSolid/";
license = with licenses; [ gpl2Plus free ];
maintainers = with maintainers; [ iblech ];
platforms = platforms.unix;
};
}