@@ -0,0 +1,52 @@
1+{ lib
2+, stdenv
3+, fetchFromGitHub
4+, pkg-config
5+, SDL2
6+, SDL2_image
7+, SDL2_mixer
8+, cmake
9+, gtk3-x11
10+, python3
11+, protobuf
12+}:
13+
14+stdenv.mkDerivation rec {
15+ pname = "cdogs";
16+ version = "0.11.0";
17+
18+ src = fetchFromGitHub {
19+ repo = "cdogs-sdl";
20+ owner = "cxong";
21+ rev = version;
22+ sha256 = "sha256-zWwlcEM2KsYiB48cmRTjou0C86SqeoOLrbacCR0SfIA=";
23+ };
24+
25+ postPatch = ''
26+ patchShebangs src/proto/nanopb/generator/*
27+ '';
28+
29+ cmakeFlags = [ "-DCDOGS_DATA_DIR=${placeholder "out"}/" ];
30+
31+ nativeBuildInputs = [
32+ pkg-config
33+ cmake
34+ (python3.withPackages (pp: with pp; [ pp.protobuf setuptools ]))
35+ ];
36+
37+ buildInputs = [
38+ SDL2
39+ SDL2_image
40+ SDL2_mixer
41+ gtk3-x11
42+ protobuf
43+ ];
44+
45+ meta = with lib; {
46+ homepage = "https://cxong.github.io/cdogs-sdl";
47+ description = "Open source classic overhead run-and-gun game";
48+ license = licenses.gpl2Only;
49+ maintainers = with maintainers; [ nixinator ];
50+ platforms = platforms.unix;
51+ };
52+}