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.
|
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
|
## 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
|
## Key bindings
|
||||||
GBA 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 = {
|
inputs = {
|
||||||
fenix = {
|
|
||||||
url = "github:nix-community/fenix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
};
|
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
};
|
};
|
||||||
|
@ -14,51 +10,33 @@
|
||||||
self,
|
self,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
utils,
|
utils,
|
||||||
fenix,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
utils.lib.eachDefaultSystem
|
utils.lib.eachDefaultSystem
|
||||||
(
|
(
|
||||||
system: let
|
system: let
|
||||||
pkgs = import nixpkgs-unstable {
|
pkgs = import nixpkgs-unstable { inherit system; };
|
||||||
inherit system;
|
|
||||||
overlays = [fenix.overlays.default];
|
|
||||||
};
|
|
||||||
toolchain = pkgs.fenix.complete;
|
|
||||||
dependencies = with pkgs; [ SDL2 SDL2_image ];
|
dependencies = with pkgs; [ SDL2 SDL2_image ];
|
||||||
in rec
|
in rec
|
||||||
{
|
{
|
||||||
# Executed by `nix build`
|
# Executed by `nix build`
|
||||||
packages.default =
|
packages.default = pkgs.rustPlatform.buildRustPackage {
|
||||||
(pkgs.makeRustPlatform {
|
pname = "rustboyadvance-ng";
|
||||||
inherit (toolchain) cargo rustc;
|
name = "rustboyadvance-ng";
|
||||||
})
|
src = ./.;
|
||||||
.buildRustPackage {
|
meta.mainProgram = "rustboyadvance-sdl2";
|
||||||
pname = "rustboyadvance-ng";
|
cargoLock = {
|
||||||
name = "rustboyadvance-ng";
|
lockFile = ./Cargo.lock;
|
||||||
src = ./.;
|
outputHashes = {
|
||||||
meta.mainProgram = "rustboyadvance-sdl2";
|
"libretro-backend-0.2.1" = "sha256-qsJo7wP01zhRNv4XrZJbIvOQrSJfUaqve0fNOaR6aWs=";
|
||||||
cargoLock = {
|
|
||||||
lockFile = ./Cargo.lock;
|
|
||||||
outputHashes = {
|
|
||||||
"libretro-backend-0.2.1" = "sha256-qsJo7wP01zhRNv4XrZJbIvOQrSJfUaqve0fNOaR6aWs=";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
buildInputs = dependencies;
|
|
||||||
};
|
};
|
||||||
|
buildInputs = dependencies;
|
||||||
|
};
|
||||||
# Executed by `nix run`
|
# Executed by `nix run`
|
||||||
apps.default = utils.lib.mkApp {drv = packages.default;};
|
apps.default = utils.lib.mkApp {drv = packages.default;};
|
||||||
|
|
||||||
# Used by `nix develop`
|
# Used by `nix develop`
|
||||||
devShells.default = pkgs.mkShell rec {
|
devShells.default = pkgs.mkShell rec { buildInputs = dependencies; };
|
||||||
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";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue