Files
snespatcher/flake.nix
T
2026-08-26 21:33:44 -04:00

80 lines
1.9 KiB
Nix

{
description = "SNES Patcher";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
snespatcher = pkgs.rustPlatform.buildRustPackage {
pname = "snespatcher";
version = "0.1.0";
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
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
];
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;
});
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.default ];
packages = with pkgs; [
cargo
clippy
rustc
rustfmt
];
};
});
};
}