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.2";
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-VSCMBKyDgNjwRUvT29z3KdN/dReqbmaaNeWomnyFJFg=";
24 };
25
26 build-system = [ setuptools ];
27
28 nativeCheckInputs = [
29 pytestCheckHook
30 ]
31 ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
32
33 pythonImportsCheck = [ "pybase64" ];
34
35 meta = {
36 description = "Fast Base64 encoding/decoding";
37 mainProgram = "pybase64";
38 homepage = "https://github.com/mayeut/pybase64";
39 changelog = "https://github.com/mayeut/pybase64/releases/tag/${src.tag}";
40 license = lib.licenses.bsd2;
41 maintainers = [ ];
42 };
43}