Absolutely adorable, it goes straight into my “games” category with `bb` and `oneko`. As it only takes a minute, is good practice, and may be helpful for others, here is a quick minimal Nix expression:
# vim: set ts=8 sw=2 sts=2 et:
#
# nix-build --no-out-link -E 'with import <nixpkgs> {}; callPackage ./default.nix {}'
{ pkgs ? import <nixpkgs> { }, ncurses, pkg-config, stdenv }:
stdenv.mkDerivation rec {
version = "1.0.0";
pname = "cbonsai";
src = pkgs.fetchFromGitLab {
owner = "jallbrit";
repo = pname;
rev = "v${version}";
sha256 = "1jc34j627pnyjgs8hjxqaa89j24gyf0rq9w61mkhgg0kria62as7";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ncurses ];
installFlags = [ "PREFIX=$(out)" ];
}