diff --git a/.gitignore b/.gitignore index 3fbc687..09a66d6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ ## build .build +result ## binairies crash @@ -16,3 +17,6 @@ compile_commands.json ## Debug .dbug + +# Cache +.cache \ No newline at end of file diff --git a/base-config.mk b/base-config.mk index 99982ac..8a18331 100644 --- a/base-config.mk +++ b/base-config.mk @@ -3,7 +3,11 @@ KERNEL := $(shell uname) / ?= ./ BUILD := $/.build +ifeq ($(KERNEL),Darwin) +CC := clang +else CC := gcc +endif LD := $(CC) AR ?= ar diff --git a/flake.nix b/flake.nix index 23492e3..4bbd839 100644 --- a/flake.nix +++ b/flake.nix @@ -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); diff --git a/nix/crash.nix b/nix/crash.nix index facb8ab..e63cdeb 100644 --- a/nix/crash.nix +++ b/nix/crash.nix @@ -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"; }; }