Files
nixpkgs/pkgs/by-name/cd/cdogs-sdl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

71 lines
1.4 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
SDL2,
SDL2_image,
SDL2_mixer,
cmake,
gtk3-x11,
python3,
protobuf,
}:
stdenv.mkDerivation rec {
pname = "cdogs-sdl";
version = "2.3.2";
src = fetchFromGitHub {
repo = "cdogs-sdl";
owner = "cxong";
rev = version;
sha256 = "sha256-g1eLFdHsmqnz6zTlmaiLOXgX5dnS94k/PvaFJE3gfLo=";
};
postPatch = ''
patchShebangs src/proto/nanopb/generator/*
'';
cmakeFlags = [
"-DCDOGS_DATA_DIR=${placeholder "out"}/"
"-DCMAKE_C_FLAGS=-Wno-error=array-bounds"
];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=stringop-overflow"
];
nativeBuildInputs = [
pkg-config
cmake
(python3.withPackages (
pp: with pp; [
pp.protobuf
setuptools
]
))
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
gtk3-x11
protobuf
];
# inlining failed in call to 'tinydir_open': --param max-inline-insns-single limit reached
hardeningDisable = [ "fortify3" ];
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;
broken = stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/cdogs-sdl.x86_64-darwin
};
}