From 129b9c193e6dce85dc6ecc361002e30b5fef669e Mon Sep 17 00:00:00 2001 From: traxys Date: Mon, 21 Jul 2025 12:00:41 +0200 Subject: [PATCH] pkgs: Add msbt tools --- pkgs/default.nix | 2 ++ pkgs/msbt.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/msbt.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 8e8e4c4..1ec6964 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -21,6 +21,8 @@ sarc = pkgs.callPackage ./sarc.nix { inherit rstb; }; rstb = pkgs.callPackage ./rstb.nix { inherit oead; }; oead = pkgs.callPackage ./oead.nix { }; + msbt = pkgs.python3.pkgs.callPackage ./msbt.nix { }; + msbt-python = pkgs.python3.withPackages (_: [ msbt ]); }; }; } diff --git a/pkgs/msbt.nix b/pkgs/msbt.nix new file mode 100644 index 0000000..6e23b74 --- /dev/null +++ b/pkgs/msbt.nix @@ -0,0 +1,36 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + setuptools, + wheel, +}: + +buildPythonPackage rec { + pname = "pymsbt"; + version = "1.0.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "p1gyy"; + repo = "pymsbt"; + rev = "v${version}"; + hash = "sha256-LP+9SKbvDnjd5jxZYUKIqyJUp96Ee71ndkoQ6oceoJg="; + }; + + build-system = [ + setuptools + wheel + ]; + + pythonImportsCheck = [ + "pymsbt" + ]; + + meta = { + description = "A python library for parsing and editing .msbt files"; + homepage = "https://github.com/p1gyy/pymsbt"; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ ]; + }; +}