python310Packages.libknot: init at 3.3.2

Python bindings to interface with libknot and Knot DNS.
This commit is contained in:
Martin Weinelt 2023-09-29 16:29:49 +02:00
parent 32d09494bc
commit 514a558d64
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{ lib
, buildPythonPackage
, fetchPypi
# build-system
, hatchling
# native dependencies
, knot-dns
}:
buildPythonPackage rec {
pname = "libknot";
version = "3.3.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-uttdIl2ONoR9ba6gJXmJkU++UQldcezwTUG+X5mCcbE=";
};
postPatch = ''
substituteInPlace libknot/__init__.py \
--replace "libknot%s.dylib" "${lib.getLib knot-dns}/lib/libknot%s.dylib" \
--replace "libknot.so%s" "${lib.getLib knot-dns}/lib/libknot.so%s"
'';
nativeBuildInputs = [
hatchling
];
pythonImportsCheck = [
"libknot"
];
meta = with lib; {
description = "Python bindings for libknot";
homepage = "https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/libknot";
license = licenses.gpl3Only;
maintainers = with maintainers; [ hexa ];
mainProgram = "libknot";
};
}

View File

@ -6142,6 +6142,8 @@ self: super: with self; {
libkeepass = callPackage ../development/python-modules/libkeepass { };
libknot = callPackage ../development/python-modules/libknot { };
liblarch = callPackage ../development/python-modules/liblarch { };
liblzfse = callPackage ../development/python-modules/liblzfse {