Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
c7b445bac4 | |||
8d95397e9a | |||
d8ec881d70 |
|
@ -13,7 +13,7 @@ Nintendo GameBoy Advance™ emulator and debugger, written in Rust.
|
|||
The file at [`external/gamecontrollerdb.txt`](./external/gamecontrollerdb.txt) is not my work - it is sourced from [this GitHub repository](https://github.com/mdqinc/SDL_GameControllerDB) and covered by the appropriate license present in said repository.
|
||||
|
||||
## Usage
|
||||
You will need to specify the BIOS file to run with, using the `--bios` command-line argument. Note that there is such a BIOS ROM present in this directory at [`./external/gba_bios.bin`](./external/gba_bios.bin)
|
||||
You will need to specify the BIOS file to run with, using the `--bios` command-line argument. Note that there is such a BIOS ROM present in this directory at [`./external/gba_bios.bin`](./external/gba_bios.bin).
|
||||
|
||||
## Key bindings
|
||||
GBA key bindings:
|
||||
|
|
50
flake.nix
50
flake.nix
|
@ -1,11 +1,7 @@
|
|||
{
|
||||
description = "Rust development environment for oxitoko using fenix";
|
||||
description = "Rust development environment for rustboyadvance-ng";
|
||||
|
||||
inputs = {
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
@ -14,51 +10,33 @@
|
|||
self,
|
||||
nixpkgs-unstable,
|
||||
utils,
|
||||
fenix,
|
||||
...
|
||||
}:
|
||||
utils.lib.eachDefaultSystem
|
||||
(
|
||||
system: let
|
||||
pkgs = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
overlays = [fenix.overlays.default];
|
||||
};
|
||||
toolchain = pkgs.fenix.complete;
|
||||
pkgs = import nixpkgs-unstable { inherit system; };
|
||||
dependencies = with pkgs; [ SDL2 SDL2_image ];
|
||||
in rec
|
||||
{
|
||||
# Executed by `nix build`
|
||||
packages.default =
|
||||
(pkgs.makeRustPlatform {
|
||||
inherit (toolchain) cargo rustc;
|
||||
})
|
||||
.buildRustPackage {
|
||||
pname = "rustboyadvance-ng";
|
||||
name = "rustboyadvance-ng";
|
||||
src = ./.;
|
||||
meta.mainProgram = "rustboyadvance-sdl2";
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"libretro-backend-0.2.1" = "sha256-qsJo7wP01zhRNv4XrZJbIvOQrSJfUaqve0fNOaR6aWs=";
|
||||
};
|
||||
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "rustboyadvance-ng";
|
||||
name = "rustboyadvance-ng";
|
||||
src = ./.;
|
||||
meta.mainProgram = "rustboyadvance-sdl2";
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"libretro-backend-0.2.1" = "sha256-qsJo7wP01zhRNv4XrZJbIvOQrSJfUaqve0fNOaR6aWs=";
|
||||
};
|
||||
buildInputs = dependencies;
|
||||
};
|
||||
|
||||
buildInputs = dependencies;
|
||||
};
|
||||
# Executed by `nix run`
|
||||
apps.default = utils.lib.mkApp {drv = packages.default;};
|
||||
|
||||
# Used by `nix develop`
|
||||
devShells.default = pkgs.mkShell rec {
|
||||
buildInputs = with pkgs; [
|
||||
(with toolchain; [
|
||||
cargo rustc rust-src clippy rustfmt # rust components
|
||||
])
|
||||
] ++ dependencies;
|
||||
RUST_SRC_PATH = "${toolchain.rust-src}/lib/rustlib/src/rust/library";
|
||||
};
|
||||
devShells.default = pkgs.mkShell rec { buildInputs = dependencies; };
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Reference in a new issue