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