pkgs: Add switch tools

This commit is contained in:
traxys 2025-07-08 23:59:39 +02:00
parent 3a9e17e8ca
commit 8c319f84db
4 changed files with 128 additions and 1 deletions

View file

@ -6,7 +6,7 @@
...
}:
{
packages = {
packages = rec {
simulationcraft = pkgs.callPackage ./simulationcraft.nix {
simulationcraft-src = inputs.simulationcraft;
};
@ -18,6 +18,9 @@
weakauras-companion = pkgs.callPackage ./weakauras-companion.nix { };
wow-note = pkgs.callPackage ./wow-note { };
rmc = pkgs.callPackage ./rmc.nix { };
sarc = pkgs.callPackage ./sarc.nix { inherit rstb; };
rstb = pkgs.callPackage ./rstb.nix { inherit oead; };
oead = pkgs.callPackage ./oead.nix { };
};
};
}

40
pkgs/oead.nix Normal file
View file

@ -0,0 +1,40 @@
{
lib,
python311,
fetchFromGitHub,
cmake,
}:
python311.pkgs.buildPythonApplication rec {
pname = "oead";
version = "1.2.9-4";
pyproject = true;
src = fetchFromGitHub {
owner = "zeldamods";
repo = "oead";
rev = "v${version}";
hash = "sha256-rBzXs5OaSssCjakOmGRsvL0OSq1EApllRN59lFaRNrU=";
fetchSubmodules = true;
};
dontUseCmakeConfigure = true;
build-system = [
python311.pkgs.setuptools
python311.pkgs.wheel
cmake
];
pythonImportsCheck = [
"oead"
];
meta = {
description = "Library for recent Nintendo EAD formats in first-party games";
homepage = "https://github.com/zeldamods/oead";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ ];
mainProgram = "oead";
};
}

42
pkgs/rstb.nix Normal file
View file

@ -0,0 +1,42 @@
{
lib,
python311,
fetchFromGitHub,
oead,
}:
python311.pkgs.buildPythonApplication rec {
pname = "rstb";
version = "1.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "zeldamods";
repo = "rstb";
rev = "v${version}";
hash = "sha256-wd+kR+bQqaD9VNMSO3SNkA6uUe/6SFje8VmhbkJD0xg=";
};
nativeBuildInputs = [ python311.pkgs.pythonRelaxDepsHook ];
build-system = [
python311.pkgs.setuptools
python311.pkgs.wheel
];
dependencies = [ oead ];
pythonRelaxDeps = [ "oead" ];
pythonImportsCheck = [
"rstb"
];
meta = {
description = "Utilities to modify Breath of the Wild's Resource Size Table (RSTB";
homepage = "https://github.com/zeldamods/rstb";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ ];
mainProgram = "rstb";
};
}

42
pkgs/sarc.nix Normal file
View file

@ -0,0 +1,42 @@
{
lib,
python311,
fetchFromGitHub,
rstb,
}:
python311.pkgs.buildPythonApplication rec {
pname = "sarc";
version = "2.0.5";
pyproject = true;
src = fetchFromGitHub {
owner = "zeldamods";
repo = "sarc";
rev = "v${version}";
hash = "sha256-F6ra0AOd5yGZX4lWXHUO3fk5oK1hT7j1wWzZeWSbD84=";
};
build-system = [
python311.pkgs.setuptools
python311.pkgs.wheel
];
nativeBuildInputs = [ python311.pkgs.pythonRelaxDepsHook ];
dependencies = [ rstb ];
pythonImportsCheck = [
"sarc"
];
pythonRelaxDeps = [ "oead" ];
meta = {
description = "Nintendo SARC archive reader and writer";
homepage = "https://github.com/zeldamods/sarc";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ ];
mainProgram = "sarc";
};
}