Skip to content

Commit

Permalink
Add MacOS aarch64 build in flake
Browse files Browse the repository at this point in the history
  • Loading branch information
savalet committed Feb 22, 2025
1 parent 99f0344 commit ba2d991
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

## build
.build
result

## binairies
crash
Expand All @@ -16,3 +17,6 @@ compile_commands.json

## Debug
.dbug

# Cache
.cache
4 changes: 4 additions & 0 deletions base-config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ KERNEL := $(shell uname)
/ ?= ./
BUILD := $/.build

ifeq ($(KERNEL),Darwin)
CC := clang
else
CC := gcc
endif
LD := $(CC)

AR ?= ar
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
] (system: function nixpkgs.legacyPackages.${system});
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
Expand Down
2 changes: 1 addition & 1 deletion nix/crash.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stdenv.mkDerivation {
description = "Crash resilient auspicious shell.";
maintainers = with lib.maintainers; [savalet sigmanificient];
license = lib.licenses.mit;
platforms = lib.platforms.linux;
platforms = [lib.platforms.linux "aarch64-darwin"];
mainProgram = "crash";
};
}

0 comments on commit ba2d991

Please sign in to comment.