From e735722fb90fd911a9915d5b103d0176074df089 Mon Sep 17 00:00:00 2001 From: IGI-111 Date: Mon, 27 May 2024 03:42:28 +0400 Subject: [PATCH] Enable darwin target --- .github/workflows/nix-github-actions.yml | 4 ++-- flake.nix | 29 +++++++++++++++++++----- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/nix-github-actions.yml b/.github/workflows/nix-github-actions.yml index 7d329e8..3dc0069 100644 --- a/.github/workflows/nix-github-actions.yml +++ b/.github/workflows/nix-github-actions.yml @@ -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: | @@ -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 }}" diff --git a/flake.nix b/flake.nix index 6a55c79..5674633 100644 --- a/flake.nix +++ b/flake.nix @@ -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 @@ -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}"); }