2026-08-26 21:33:44 -04:00
|
|
|
{
|
|
|
|
|
description = "SNES Patcher";
|
|
|
|
|
|
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
|
|
2026-08-27 22:01:13 -04:00
|
|
|
outputs =
|
|
|
|
|
{ self, nixpkgs }:
|
2026-08-26 21:33:44 -04:00
|
|
|
let
|
|
|
|
|
supportedSystems = [
|
|
|
|
|
"x86_64-linux"
|
|
|
|
|
"aarch64-linux"
|
|
|
|
|
];
|
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
|
in
|
|
|
|
|
{
|
2026-08-27 22:01:13 -04:00
|
|
|
formatter = forAllSystems (
|
|
|
|
|
system:
|
|
|
|
|
let
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
in
|
|
|
|
|
pkgs.nixfmt-rfc-style
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
packages = forAllSystems (
|
|
|
|
|
system:
|
2026-08-26 21:33:44 -04:00
|
|
|
let
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
in
|
|
|
|
|
rec {
|
|
|
|
|
snespatcher = pkgs.rustPlatform.buildRustPackage {
|
|
|
|
|
pname = "snespatcher";
|
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
|
|
src = pkgs.lib.cleanSourceWith {
|
|
|
|
|
src = ./.;
|
2026-08-27 22:01:13 -04:00
|
|
|
filter =
|
|
|
|
|
path: type:
|
2026-08-26 21:33:44 -04:00
|
|
|
let
|
|
|
|
|
name = baseNameOf path;
|
|
|
|
|
in
|
|
|
|
|
!builtins.elem name [
|
|
|
|
|
".agents"
|
|
|
|
|
".codex"
|
|
|
|
|
".git"
|
|
|
|
|
"target"
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
|
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
|
glib
|
|
|
|
|
pkg-config
|
|
|
|
|
wrapGAppsHook4
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
|
gtk4
|
|
|
|
|
];
|
|
|
|
|
|
2026-08-27 22:01:13 -04:00
|
|
|
postInstall = ''
|
|
|
|
|
install -Dm444 \
|
|
|
|
|
data/com.wyattjmiller.snespatcher.desktop \
|
|
|
|
|
$out/share/applications/com.wyattjmiller.snespatcher.desktop
|
|
|
|
|
|
|
|
|
|
install -Dm444 \
|
|
|
|
|
data/com.wyattjmiller.snespatcher.metainfo.xml \
|
|
|
|
|
$out/share/metainfo/com.wyattjmiller.snespatcher.metainfo.xml
|
|
|
|
|
|
|
|
|
|
install -Dm444 \
|
|
|
|
|
data/icons/hicolor/scalable/apps/com.wyattjmiller.snespatcher.svg \
|
|
|
|
|
$out/share/icons/hicolor/scalable/apps/com.wyattjmiller.snespatcher.svg
|
|
|
|
|
'';
|
|
|
|
|
|
2026-08-26 21:33:44 -04:00
|
|
|
meta = {
|
|
|
|
|
description = "GTK 4 application for applying IPS patches to SNES ROMs";
|
|
|
|
|
homepage = "https://scm.wyattjmiller.com/wymiller/snespatcher";
|
|
|
|
|
license = pkgs.lib.licenses.mpl20;
|
|
|
|
|
mainProgram = "snespatcher";
|
|
|
|
|
platforms = pkgs.lib.platforms.linux;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
default = snespatcher;
|
2026-08-27 22:01:13 -04:00
|
|
|
}
|
|
|
|
|
);
|
2026-08-26 21:33:44 -04:00
|
|
|
|
2026-08-27 22:01:13 -04:00
|
|
|
devShells = forAllSystems (
|
|
|
|
|
system:
|
2026-08-26 21:33:44 -04:00
|
|
|
let
|
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
|
inputsFrom = [ self.packages.${system}.default ];
|
|
|
|
|
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
cargo
|
|
|
|
|
clippy
|
|
|
|
|
rustc
|
|
|
|
|
rustfmt
|
2026-08-27 22:01:13 -04:00
|
|
|
desktop-file-utils
|
|
|
|
|
appstream
|
2026-08-26 21:33:44 -04:00
|
|
|
];
|
|
|
|
|
};
|
2026-08-27 22:01:13 -04:00
|
|
|
}
|
|
|
|
|
);
|
2026-08-26 21:33:44 -04:00
|
|
|
};
|
|
|
|
|
}
|