summary refs log tree commit diff
path: root/default.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-04-13 07:59:29 +0200
committerMel <einebeere@gmail.com>2024-04-13 07:59:29 +0200
commit727983e0a7033e0b778c38e0a0b51a5bc0e9fc2b (patch)
tree76919734109190ea5b867ea89df169f3b7afaf9a /default.nix
parent4ce39fff5cf708887817870977d2dbaaee19f9c9 (diff)
downloadmeowcraft-727983e0a7033e0b778c38e0a0b51a5bc0e9fc2b.tar.zst
meowcraft-727983e0a7033e0b778c38e0a0b51a5bc0e9fc2b.zip
Create Meson build configuration
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/default.nix b/default.nix
index ec42aa9..afaf4e9 100644
--- a/default.nix
+++ b/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, cmake, glew, glfw }:
+{ lib, stdenv, meson, ninja, pkg-config, glew, glfw }:
 
 stdenv.mkDerivation {
   pname = "meowcraft";
@@ -6,14 +6,14 @@ stdenv.mkDerivation {
 
   src = ./.;
 
-  nativeBuildInputs = [ cmake ];
+  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.
 
-  cmakeFlags = [
-    "-DCMAKE_BUILD_TYPE=Release"
-    "-DCMAKE_INSTALL_PREFIX=\${out}"
+  mesonFlags = [
+    "--buildtype" "release"
+    "--prefix" "${placeholder "out"}"
   ];
 
   meta = with lib; {