Skip to content

Commit 17b2a0e

Browse files
committed
python3Packages.pynng: init at 0.8.1-unstable-2025-05-14
1 parent 444b7f3 commit 17b2a0e

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
lib,
3+
cmake,
4+
ninja,
5+
buildPythonPackage,
6+
fetchFromGitHub,
7+
setuptools,
8+
setuptools-scm,
9+
cffi,
10+
sniffio,
11+
pytest,
12+
trio,
13+
pytest-trio,
14+
pytest-asyncio,
15+
}:
16+
let
17+
nng = fetchFromGitHub {
18+
owner = "nanomsg";
19+
repo = "nng";
20+
tag = "v1.6.0";
21+
sha256 = "sha256-Kq8QxPU6SiTk0Ev2IJoktSPjVOlAS4/e1PQvw2+e8UA=";
22+
};
23+
24+
mbedtls = fetchFromGitHub {
25+
owner = "ARMmbed";
26+
repo = "mbedtls";
27+
tag = "v3.5.1";
28+
sha256 = "sha256-HxsHcGbSExp1aG5yMR/J3kPL4zqnmNoN5T5wfV3APaw=";
29+
};
30+
31+
in
32+
buildPythonPackage {
33+
pname = "pynng";
34+
version = "0.8.1-unstable-2025-05-14";
35+
format = "pyproject";
36+
37+
src = fetchFromGitHub {
38+
owner = "codypiersall";
39+
repo = "pynng";
40+
rev = "2179328f8a858bbb3e177f66ac132bde4a5aa859";
41+
sha256 = "sha256-TxIVcqc+4bro+krc1AWgLdZKGGuQ2D6kybHnv5z1oHg=";
42+
};
43+
44+
nativeBuildInputs = [
45+
cmake
46+
ninja
47+
];
48+
49+
build-system = [
50+
setuptools
51+
setuptools-scm
52+
];
53+
54+
preBuild = ''
55+
cp -r ${mbedtls} mbedtls
56+
chmod -R +w mbedtls
57+
cp -r ${nng} nng
58+
chmod -R +w nng
59+
'';
60+
61+
dontUseCmakeConfigure = true;
62+
63+
dependencies = [
64+
cffi
65+
sniffio
66+
pytest
67+
trio
68+
pytest-trio
69+
pytest-asyncio
70+
];
71+
72+
pythonImportsCheck = [
73+
"pynng"
74+
];
75+
76+
meta = {
77+
description = "Python bindings for Nanomsg Next Generation";
78+
homepage = "https://github.com/codypiersall/pynng";
79+
license = lib.licenses.mit;
80+
maintainers = with lib.maintainers; [ afermg ];
81+
platforms = lib.platforms.all;
82+
};
83+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13191,6 +13191,8 @@ self: super: with self; {
1319113191

1319213192
pynndescent = callPackage ../development/python-modules/pynndescent { };
1319313193

13194+
pynng = callPackage ../development/python-modules/pynng { };
13195+
1319413196
pynobo = callPackage ../development/python-modules/pynobo { };
1319513197

1319613198
pynordpool = callPackage ../development/python-modules/pynordpool { };

0 commit comments

Comments
 (0)