Move the emulator into crates/gba-core, the original demo programs into crates/gba-demos, and the minifb frontend into crates/desktop. The binary is now gameboy-rust. Imports change from gba_rust to gba_core/gba_demos; no behavior changes. gba-core has no dependencies. Its integration tests use gba-demos as a development dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
944 B
Nix
23 lines
944 B
Nix
{
|
|
description = "Game Boy family emulation in Rust, starting with the GBA";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
outputs = { nixpkgs, ... }:
|
|
let
|
|
systems = [ "aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux" ];
|
|
in {
|
|
devShells = nixpkgs.lib.genAttrs systems (system:
|
|
let pkgs = import nixpkgs { inherit system; };
|
|
in {
|
|
default = pkgs.mkShell ({
|
|
packages = with pkgs; [ rustc cargo rustfmt clippy ];
|
|
} // pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isDarwin {
|
|
# minifb 0.28 hard-codes macOS 10.10 before user CFLAGS.
|
|
# Match the Nix SDK's deployment target so Metal APIs are available.
|
|
# Its Objective-C files also share a tentative g_metal_device definition.
|
|
CFLAGS = "-mmacosx-version-min=${pkgs.stdenv.hostPlatform.darwinMinVersion} -fcommon";
|
|
});
|
|
});
|
|
};
|
|
}
|