1{
2 buildPythonPackage,
3 lib,
4 fetchFromGitHub,
5 setuptools,
6 cffi,
7 libsodium,
8 libxeddsa,
9 pytestCheckHook,
10 nix-update-script,
11}:
12
13buildPythonPackage rec {
14 pname = "xeddsa";
15 version = "1.1.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "Syndace";
20 repo = "python-xeddsa";
21 tag = "v${version}";
22 hash = "sha256-636zsJXD8EtLDXMIkJTON0g3sg0EPrMzcfR7SUrURac=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace-fail "setuptools<74" "setuptools"
28 '';
29
30 passthru.updateScript = nix-update-script { };
31
32 build-system = [ setuptools ];
33
34 buildInputs = [
35 libsodium
36 libxeddsa
37 ];
38
39 dependencies = [ cffi ];
40
41 nativeCheckInputs = [
42 pytestCheckHook
43 ];
44
45 pythonImportsCheck = [ "xeddsa" ];
46
47 meta = {
48 description = "Python bindings to libxeddsa";
49 homepage = "https://github.com/Syndace/python-xeddsa";
50 changelog = "https://github.com/Syndace/python-xeddsa/blob/v${version}/CHANGELOG.md";
51 license = lib.licenses.mit;
52 teams = with lib.teams; [ ngi ];
53 maintainers = with lib.maintainers; [ ];
54 };
55}