depot/third_party/nixpkgs/pkgs/development/python-modules/libknot/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

39 lines
856 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
hatchling,
# native dependencies
knot-dns,
}:
buildPythonPackage rec {
pname = "libknot";
version = "3.4.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-BtESc9BIZeDNNPJYyMLTeMsNHm+xBcLueyJ7/1iXFos=";
};
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 ];
};
}