2021-04-12 18:23:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, SDL2
|
|
|
|
, SDL2_image
|
|
|
|
, SDL2_mixer
|
|
|
|
, cmake
|
|
|
|
, gtk3-x11
|
|
|
|
, python3
|
|
|
|
, protobuf
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cdogs";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "0.13.0";
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "cdogs-sdl";
|
|
|
|
owner = "cxong";
|
|
|
|
rev = version;
|
2021-07-24 12:14:16 +00:00
|
|
|
sha256 = "sha256-7wNiDA/gOpqzSFWw8Bn6suC/f5RXdDTxPV49nCvOxas=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
patchShebangs src/proto/nanopb/generator/*
|
|
|
|
'';
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DCDOGS_DATA_DIR=${placeholder "out"}/"
|
|
|
|
"-DCMAKE_C_FLAGS=-Wno-error=array-bounds"
|
|
|
|
];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
cmake
|
|
|
|
(python3.withPackages (pp: with pp; [ pp.protobuf setuptools ]))
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
SDL2_image
|
|
|
|
SDL2_mixer
|
|
|
|
gtk3-x11
|
|
|
|
protobuf
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://cxong.github.io/cdogs-sdl";
|
|
|
|
description = "Open source classic overhead run-and-gun game";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ nixinator ];
|
|
|
|
platforms = platforms.unix;
|
2021-12-21 02:18:32 +00:00
|
|
|
broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/cdogs-sdl.x86_64-darwin
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
}
|