nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, lib, fetchurl, pkg-config, gettext, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf, zlib }:
2
3stdenv.mkDerivation rec {
4 pname = "blobwars";
5 version = "2.00";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
9 sha256 = "c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99";
10 };
11
12 nativeBuildInputs = [ pkg-config gettext ];
13 buildInputs = [ SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf zlib ];
14 env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error" ];
15
16 makeFlags = [ "PREFIX=$(out)" "RELEASE=1" ];
17
18 postInstall = ''
19 install -Dm755 $out/games/blobwars -t $out/bin
20 rm -r $out/games
21 cp -r {data,gfx,sound,music} $out/share/games/blobwars/
22 # fix world readable bit
23 find $out/share/games/blobwars/. -type d -exec chmod 755 {} +
24 find $out/share/games/blobwars/. -type f -exec chmod 644 {} +
25 '';
26
27 meta = with lib; {
28 description = "Platform action game featuring a blob with lots of weapons";
29 homepage = "https://www.parallelrealities.co.uk/games/metalBlobSolid/";
30 license = with licenses; [ gpl2Plus free ];
31 maintainers = with maintainers; [ iblech ];
32 platforms = platforms.unix;
33 };
34}