diff options
author | Andreas Fuchs <[email protected]> | 2021-10-28 16:09:10 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2021-10-29 14:14:14 +0100 |
commit | 81ce42286cd8f56b8ed154c65d57780b68a3e810 (patch) | |
tree | 0e9a5b1c3f1ba8633f4bf4a590f0c02b2e343833 /flake.nix | |
parent | a34ab7a09f37fd319ec4444417a0edb6ba4058a8 (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.
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | ''; |