gameboy-rust/flake.nix
0xrsydn f8a0676748 refactor: split into gameboy-rust workspace with core, demos, and desktop crates
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>
2026-10-05 16:09:46 +07:00

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";
});
});
};
}