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

View file

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