Ok, as some more learning exercises (the best way to learn something is do something with it) , and my success with super methane brothers, I’d though i’d give cdogs a try.
I got it to compile and run!!! but only once!!! yep you heard it , only once! That was using a nix-shell … however, it would not compile in a pure nix shell.
i suspect some fixed output derivation caused by python3.withPackages or some non-determinism in the actual cdogs build, or impurity in my shell, or the nix-shell causing strange effect in my calling enviroment… yikes!!
It uses the dreaded google protobuf, and needs python3 with python protobufs binding installed.
I’m probably doing something not quite right here… non-determinism in builds make me shudder, i know it does happen…i’ve fixed many of broken builds.(not mine)…
This is could be do a impurity in my system, or something in the nix-shell modified my environment… quite possible… this maybe broken, but the only thing that’s got me thinking , is why did it compile that one time??? it’s got to be the ordering of the build… and i was lucky!..
maybe it’s bringing it’s own protobufs…but i’ve got to put it down for now.
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, SDL2
, SDL2_image
, SDL2_mixer
, fontconfig
, freealut
, freeglut
, gettext
, libGL
, libGLU
, openal
, quesoglc
, libXrender
, libmikmod
, alsaLib
, cmake
, gtk3-x11
, python3
, protobuf
}:
stdenv.mkDerivation rec {
pname = "cdogs";
version = "0.11.0";
src = fetchFromGitHub {
repo = "cdogs-sdl";
owner = "cxong";
rev = "${version}";
sha256 = "sha256-zWwlcEM2KsYiB48cmRTjou0C86SqeoOLrbacCR0SfIA=";
};
nativeBuildInputs = [
gettext
pkg-config
cmake
(python3.withPackages (pp: with pp; [ protobuf setuptools ]))
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
fontconfig
freealut
freeglut
libGL
libGLU
openal
quesoglc
libXrender
libmikmod
alsaLib
gtk3-x11
protobuf
];
installPhase = ''
#runHook preInstall
#runHook postInstall
'';
meta = with lib; {
homepage = "https://cxong.github.io/cdogs-sdl";
description = "Open sourcem ckassic overhead run-and-gun game";
license = licenses.gpl2Only;
maintainers = with maintainers; [ nixinator ];
platforms = platforms.unix;
};
}