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