Skip to content

Commit

Permalink
ignore gcc for x86-64 for now and let aarch64-darwin use native clang
Browse files Browse the repository at this point in the history
Signed-off-by: Thing-han, Lim <[email protected]>
  • Loading branch information
potsrevennil committed May 31, 2024
1 parent 6b612d2 commit c04d057
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { pkgs, system, ... }:
perSystem = { pkgs, ... }:
let
# NOTE: For installing pkgs specific for aarch64 (not sure if there is any better way of doing this)
aarch64-system = "aarch64-" + pkgs.lib.lists.last (pkgs.lib.strings.splitString "-" system);
aarch64-pkgs = inputs.nixpkgs.legacyPackages.${aarch64-system};
core = builtins.attrValues
{
inherit (pkgs)
Expand All @@ -29,7 +26,11 @@
nixpkgs-fmt
shfmt;
}
++ [ (aarch64-pkgs.gcc13.override { propagateDoc = true; isGNU = true; }) ];
# ignore gcc for x86_64 machines, and arch64-darwin should just use the native clang
++ (if !pkgs.stdenv.isDarwin && pkgs.stdenv.isAarch64
then [ (pkgs.gcc13.override { propagateDoc = true; isGNU = true; }) ]
else [ ]
);

in
{
Expand Down

0 comments on commit c04d057

Please sign in to comment.