depot/third_party/nixpkgs/pkgs/development/python-modules/libknot/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

39 lines
856 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
hatchling,
# native dependencies
knot-dns,
}:
buildPythonPackage rec {
pname = "libknot";
version = "3.3.6";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-N96gdO5sezMyKt0QdX7ORg5DnEVSqb1j+WohvOHdYYU=";
};
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"
'';
build-system = [ 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 ];
};
}