diff options
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/default.nix b/default.nix index afaf4e9..5fb4943 100644 --- a/default.nix +++ b/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, meson, ninja, pkg-config, glew, glfw }: +{ lib, stdenv, meson, ninja, pkg-config, lld, glew, glfw, Cocoa, OpenGL }: + stdenv.mkDerivation { pname = "meowcraft"; @@ -6,16 +7,18 @@ stdenv.mkDerivation { src = ./.; - nativeBuildInputs = [ meson ninja pkg-config ]; - 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. + nativeBuildInputs = [ meson ninja pkg-config lld ]; + buildInputs = [ glew glfw ] + ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ]; mesonFlags = [ - "--buildtype" "release" - "--prefix" "${placeholder "out"}" + "--buildtype=release" + "--prefix=${placeholder "out"}" ]; + # FIXME: Currently the built binary on darwin can not be run outside + # of the nix store, because of it's dependencies on the nix libc++ and libc++abi dylibs. + meta = with lib; { description = "a dumb minecraft in c++ and opengl."; homepage = "https://git.rnrd.eu/meowcraft"; |
