1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 typing-extensions,
9}:
10
11buildPythonPackage rec {
12 pname = "pybase64";
13 version = "1.4.1";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "mayeut";
20 repo = "pybase64";
21 tag = "v${version}";
22 fetchSubmodules = true;
23 hash = "sha256-mEwFcnqUKCWYYrcjELshJYNqTxQ//4w4OzaWhrzB5Mg=";
24 };
25
26 build-system = [ setuptools ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 ] ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
31
32 pythonImportsCheck = [ "pybase64" ];
33
34 meta = {
35 description = "Fast Base64 encoding/decoding";
36 mainProgram = "pybase64";
37 homepage = "https://github.com/mayeut/pybase64";
38 changelog = "https://github.com/mayeut/pybase64/releases/tag/${src.tag}";
39 license = lib.licenses.bsd2;
40 maintainers = [ ];
41 };
42}