Skip to content

Commit

Permalink
Enable darwin target
Browse files Browse the repository at this point in the history
  • Loading branch information
IGI-111 committed May 27, 2024
1 parent 8bbeafd commit e735722
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nix-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- uses: cachix/install-nix-action@v27
- id: set-matrix
name: Generate Nix Matrix
run: |
Expand All @@ -29,5 +29,5 @@ jobs:
matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v24
- uses: cachix/install-nix-action@v27
- run: nix build -L ".#${{ matrix.attr }}"
29 changes: 23 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,30 @@
];
};

"aarch64-darwin" =
"x86_64-darwin" =
let
pkgs = nixpkgs.legacyPackages.aarch64-darwin;
pkgs = import nixpkgs {
system = "x86_64-darwin";
config.allowUnfree = true;
};
in
# "aarch64-darwin" =
# let
# pkgs = nixpkgs.legacyPackages.aarch64-darwin;
{
inherit pkgs;
buildInputs = with pkgs; [
openssl
darwin.libicov
darwin.libiconv
darwin.libobjc
# darwin.xcode
# darwin.apple_sdk.sdk
darwin.apple_sdk.Libsystem
# darwin.apple_sdk.frameworks
darwin.apple_sdk.frameworks.SystemConfiguration
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.CoreFoundation
darwin.apple_sdk.frameworks.Cocoa
];
nativeBuildInputs = with pkgs; [
rustc
Expand All @@ -130,7 +145,9 @@
{
githubActions = nix-github-actions.lib.mkGithubMatrix { inherit (self) checks; };
}
// flake-utils.lib.eachSystem [ "x86_64-linux" ] (
system: buildPackageForSystem buildPackageDeps."${system}"
);
// flake-utils.lib.eachSystem [
"x86_64-linux"
"x86_64-darwin"
# "aarch64-darwin"
] (system: buildPackageForSystem buildPackageDeps."${system}");
}

0 comments on commit e735722

Please sign in to comment.