Created
August 29, 2024 03:36
-
-
Save charles-l/497dad09b63696526c265062c8b6fa1f to your computer and use it in GitHub Desktop.
Flake for Rust + Bevy development on M3 Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Bevy flake"; | |
inputs = | |
{ | |
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # or whatever vers | |
}; | |
outputs = { self, nixpkgs, ... }@inputs: | |
let | |
system = "aarch64-darwin"; # your version | |
pkgs = nixpkgs.legacyPackages.${system}; | |
in | |
{ | |
devShells.${system}.default = pkgs.mkShell | |
{ | |
packages = with pkgs; [ rustc cargo libiconv pkg-config ]; | |
nativeBuildInputs = with pkgs; [ | |
darwin.apple_sdk.frameworks.Foundation | |
darwin.apple_sdk.frameworks.CoreVideo | |
darwin.apple_sdk.frameworks.Carbon | |
darwin.apple_sdk.frameworks.AppKit | |
# list of frameworks in case you need another: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-sdk/frameworks.nix | |
]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment