python311Packages.nsz: add format

- disable on unsupported Python releases
- equalize content
This commit is contained in:
Fabian Affolter 2023-08-15 08:41:22 +02:00 committed by GitHub
parent f8c4fe4df3
commit 1c537fc7a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,10 @@
{ lib, buildPythonPackage, fetchFromGitHub, pycryptodome, enlighten, zstandard
{ lib
, buildPythonPackage
, fetchFromGitHub
, pycryptodome
, pythonOlder
, enlighten
, zstandard
, withGUI ? true
, kivy
}:
@ -6,6 +12,9 @@
buildPythonPackage rec {
pname = "nsz";
version = "4.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "nicoboss";
@ -14,8 +23,11 @@ buildPythonPackage rec {
hash = "sha256-glK4CK7D33FfLqHLxVr4kkb887/A9tqxPwWpcXYZu/0=";
};
propagatedBuildInputs = [pycryptodome enlighten zstandard ]
++ lib.optional withGUI kivy;
propagatedBuildInputs = [
pycryptodome
enlighten
zstandard
] ++ lib.optional withGUI kivy;
# do not check, as nsz requires producation keys
# dumped from a Nintendo Switch.
@ -23,7 +35,7 @@ buildPythonPackage rec {
meta = with lib; {
homepage = "https://github.com/nicoboss/nsz";
description = "NSZ - Homebrew compatible NSP/XCI compressor/decompressor";
description = "Homebrew compatible NSP/XCI compressor/decompressor";
changelog = "https://github.com/nicoboss/nsz/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ eyjhb ];