Compare commits

...

3 commits
v1.0.0 ... main

Author SHA1 Message Date
Muhammad Nauman Raza c7b445bac4
flake: a mixture of hotfixes and updates 2024-03-25 22:53:53 +00:00
Muhammad Nauman Raza 8d95397e9a
flake: clean of Rust installation 2024-03-25 22:49:20 +00:00
Muhammad Nauman Raza d8ec881d70
docs: add full stop. 2024-03-23 21:05:09 +00:00
2 changed files with 15 additions and 37 deletions

View file

@ -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:

View file

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