Skip to content

Commit

Permalink
specify installing arm64 gcc in nix
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 29, 2024
1 parent 1488838 commit 9f1bb4f
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { pkgs, ... }:
perSystem = { pkgs, system, ... }:
let
core = builtins.attrValues {
inherit (pkgs)
gcc13

# formatter & linters
astyle# 3.4.10
nixpkgs-fmt
shfmt;
};
# 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)
# formatter & linters
astyle# 3.4.10
nixpkgs-fmt
shfmt;
}
++ [ (aarch64-pkgs.gcc13.override { propagateDoc = true; isGNU = true; }) ];

in
{
devShells.default = pkgs.mkShellNoCC {
Expand Down

0 comments on commit 9f1bb4f

Please sign in to comment.