summary refs log tree commit diff
path: root/default.nix
blob: ec42aa928f85edf01a231ab8703979e03e184d82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ lib, stdenv, cmake, glew, glfw }:

stdenv.mkDerivation {
  pname = "meowcraft";
  version = "0.0.1";

  src = ./.;

  nativeBuildInputs = [ cmake ];
  buildInputs = [ glew glfw ];
  # NOTE: Don't packages usually also add the Apple SDKs as buildInputs?
  # Like OpenGL.framework, etc.? It seems to work without them, but I'm not sure.

  cmakeFlags = [
    "-DCMAKE_BUILD_TYPE=Release"
    "-DCMAKE_INSTALL_PREFIX=\${out}"
  ];

  meta = with lib; {
    description = "a dumb minecraft in c++ and opengl.";
    homepage = "https://git.rnrd.eu/meowcraft";
    license = licenses.free; # TODO: Choose a specific license.
    platforms = [ "x86_64-darwin" ];
    mainProgram = "meowcraft";
  };
}