aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fuchs <[email protected]>2021-10-28 16:09:10 +0100
committerAkshay <[email protected]>2021-10-29 14:14:14 +0100
commit81ce42286cd8f56b8ed154c65d57780b68a3e810 (patch)
tree0e9a5b1c3f1ba8633f4bf4a590f0c02b2e343833
parenta34ab7a09f37fd319ec4444417a0edb6ba4058a8 (diff)
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.
-rw-r--r--flake.nix4
1 files 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 @@
22 let 22 let
23 inherit (import-cargo.builders) importCargo; 23 inherit (import-cargo.builders) importCargo;
24 24
25 supportedSystems = [ "x86_64-linux" ]; 25 supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
26 forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 26 forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
27 nixpkgsFor = forAllSystems (system: 27 nixpkgsFor = forAllSystems (system:
28 import nixpkgs { 28 import nixpkgs {
@@ -58,7 +58,7 @@
58 (importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome 58 (importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome
59 rust 59 rust
60 cargo 60 cargo
61 ]; 61 ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
62 buildPhase = '' 62 buildPhase = ''
63 cargo build -p statix --all-features --release --offline 63 cargo build -p statix --all-features --release --offline
64 ''; 64 '';