summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-09-03 05:00:42 +0200
committerMel <mel@rnrd.eu>2026-09-03 05:00:42 +0200
commit3af28453019a98b26f5c08ed49a6df633b36addb (patch)
treeaf322261d917c88229c47aa5532ec11e0200ea2e /flake.nix
parent2e6e51fe4a9d7160efdcfc6c9e0df601d0544fb8 (diff)
downloadmeowcraft-3af28453019a98b26f5c08ed49a6df633b36addb.tar.zst
meowcraft-3af28453019a98b26f5c08ed49a6df633b36addb.zip
Add support for AArch64 Linux
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix26
1 files changed, 8 insertions, 18 deletions
diff --git a/flake.nix b/flake.nix
index b13d1e9..3812ff2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,12 +2,12 @@
description = "a dumb minecraft in c++ and opengl.";
inputs = {
- nixpkgs.url = "nixpkgs/nixos-23.11";
+ nixpkgs.url = "nixpkgs/nixos-25.11";
};
- outputs = { self, nixpkgs }:
+ outputs = { self, nixpkgs }:
let
- allSystems = [ "x86_64-linux" "x86_64-darwin" ];
+ allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
pkgsForSystem = system: nixpkgs.legacyPackages.${system};
@@ -15,24 +15,18 @@
(system: f { inherit system; pkgs = pkgsForSystem system; });
in {
- packages = forAllSystems ({ system, pkgs }: {
+ packages = forAllSystems ({ system, pkgs }: {
default = pkgs.callPackage ./. {
- inherit (pkgs.darwin.apple_sdk.frameworks)
- Cocoa OpenGL;
-
glfw = self.packages.${system}.glfw-static;
glew = self.packages.${system}.glew-static;
};
- # NOTE: GLFW depends on OpenSSL and coreutils, which are very
- # large dependencies and have to be rebuilt from source to be able
- # to be linked statically. Maybe there is a way to avoid this?
- glfw-static = (pkgs.glfw.overrideAttrs (oldAttrs: {
+ glfw-static = pkgs.glfw.overrideAttrs (oldAttrs: {
pname = "glfw-static";
cmakeFlags = oldAttrs.cmakeFlags ++ [
"-DBUILD_SHARED_LIBS=OFF"
];
- })).override { waylandSupport = pkgs.stdenv.isLinux; };
+ });
glew-static = pkgs.glew.overrideAttrs {
pname = "glew-static";
@@ -40,20 +34,16 @@
};
});
- devShells = forAllSystems ({ system, pkgs }:
+ devShells = forAllSystems ({ system, pkgs }:
let
inherit (pkgs) lib stdenv;
-
- darwinFrameworks = pkgs.darwin.apple_sdk.frameworks;
in
- {
+ {
default = pkgs.mkShell {
buildInputs = (with pkgs; [
pkg-config ninja cmake meson lldb
]) ++ (with self.packages.${system}; [
glfw-static glew-static
- ]) ++ lib.optionals stdenv.isDarwin (with darwinFrameworks; [
- Cocoa OpenGL
]) ++ lib.optionals stdenv.isLinux (with pkgs; [
wayland wayland-protocols libffi
]);