From 81ce42286cd8f56b8ed154c65d57780b68a3e810 Mon Sep 17 00:00:00 2001 From: Andreas Fuchs Date: Thu, 28 Oct 2021 17:09:10 +0200 Subject: Add support for macOS on intel This adds x86_64-darwin as a supported target, and adds libiconv to the native build dependencies, as otherwise the rust crate can't be compiled on Darwin. --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index f7b44e4..3a4e009 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ let inherit (import-cargo.builders) importCargo; - supportedSystems = [ "x86_64-linux" ]; + supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; nixpkgsFor = forAllSystems (system: import nixpkgs { @@ -58,7 +58,7 @@ (importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome rust cargo - ]; + ] ++ lib.optionals stdenv.isDarwin [ libiconv ]; buildPhase = '' cargo build -p statix --all-features --release --offline ''; -- cgit v1.2.3