Files
nixpkgs/pkgs/development/python-modules/libknot/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

40 lines
854 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
# build-system
hatchling,
# native dependencies
knot-dns,
}:
buildPythonPackage rec {
pname = "libknot";
version = "3.5.1";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-O4kMd07Tmiy+q/klMCoeSp23EkZNoKKeuUHMhzn+118=";
};
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 = {
description = "Python bindings for libknot";
homepage = "https://gitlab.nic.cz/knot/knot-dns/-/tree/master/python/libknot";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ hexa ];
};
}