2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pycryptodome
|
|
|
|
, pythonOlder
|
|
|
|
, enlighten
|
|
|
|
, zstandard
|
2022-11-02 22:02:43 +00:00
|
|
|
, withGUI ? true
|
|
|
|
, kivy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "nsz";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "4.6.1";
|
2023-08-22 20:05:09 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nicoboss";
|
|
|
|
repo = pname;
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-ch4HzQFa95o3HMsi7R0LpPWmhN/Z9EYfrmCdUZLwPSE=";
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pycryptodome
|
|
|
|
enlighten
|
|
|
|
zstandard
|
|
|
|
] ++ lib.optional withGUI kivy;
|
2022-11-02 22:02:43 +00:00
|
|
|
|
|
|
|
# do not check, as nsz requires producation keys
|
|
|
|
# dumped from a Nintendo Switch.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/nicoboss/nsz";
|
2023-08-22 20:05:09 +00:00
|
|
|
description = "Homebrew compatible NSP/XCI compressor/decompressor";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "nsz";
|
2023-08-22 20:05:09 +00:00
|
|
|
changelog = "https://github.com/nicoboss/nsz/releases/tag/${version}";
|
2022-11-02 22:02:43 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ eyjhb ];
|
|
|
|
};
|
|
|
|
}
|