diff options
| author | Mel <einebeere@gmail.com> | 2024-04-14 22:42:57 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-04-14 22:42:57 +0200 |
| commit | 0b2474a476b8d54967c7362c2d6bdfc76af1f05b (patch) | |
| tree | 08c1e81e36c50e5bf3240876fa345ae9eddfe21e /default.nix | |
| parent | 659c8b58e5307baad98f52199372a8b0261b4106 (diff) | |
| download | meowcraft-0b2474a476b8d54967c7362c2d6bdfc76af1f05b.tar.zst meowcraft-0b2474a476b8d54967c7362c2d6bdfc76af1f05b.zip | |
Nix build on x86_64-linux (not static yet)
Diffstat (limited to 'default.nix')
| -rw-r--r-- | default.nix | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/default.nix b/default.nix index 5fb4943..2c39828 100644 --- a/default.nix +++ b/default.nix @@ -1,6 +1,8 @@ -{ lib, stdenv, meson, ninja, pkg-config, lld, glew, glfw, Cocoa, OpenGL }: - +{ lib, clangStdenv, meson, ninja, pkg-config, lld, glew, glfw, Cocoa, OpenGL, libX11, libXau, libXdmcp }: +let + stdenv = clangStdenv; +in stdenv.mkDerivation { pname = "meowcraft"; version = "0.0.1"; @@ -9,7 +11,11 @@ stdenv.mkDerivation { nativeBuildInputs = [ meson ninja pkg-config lld ]; buildInputs = [ glew glfw ] - ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ]; + ++ lib.optionals stdenv.isDarwin [ Cocoa OpenGL ] + # TODO: Wayland support. + # NOTE: Also, even without Wayland, do we really need to link against libXau and + # libXdmcp of all things?? + ++ lib.optionals stdenv.isLinux [ libX11 libXau libXdmcp ]; mesonFlags = [ "--buildtype=release" @@ -23,7 +29,7 @@ stdenv.mkDerivation { 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" ]; + platforms = [ "x86_64-linux" "x86_64-darwin" ]; mainProgram = "meowcraft"; }; } \ No newline at end of file |
