kea: fixup python output

When the python libraries were moved to a separate output, this broke the use
of kea-shell which did not load the python support libraries correctly anymore.

The reworks the python split to use the builtin options of the meson builds
instead.

The usability of `kea-shell` is now tested in the build.
This commit is contained in:
Arthur Gautier 2026-06-30 06:09:36 +00:00
commit 5fda6a58ab

View file

@ -25,6 +25,8 @@
# tests
nixosTests,
testers,
kea,
}:
stdenv.mkDerivation (finalAttrs: {
@ -63,6 +65,8 @@ stdenv.mkDerivation (finalAttrs: {
(lib.mesonEnable "postgresql" withPostgresql)
(lib.mesonOption "localstatedir" "/var")
(lib.mesonOption "runstatedir" "/run")
(lib.mesonOption "python.platlibdir" "${placeholder "python"}/${python3.sitePackages}")
(lib.mesonOption "python.purelibdir" "${placeholder "python"}/${python3.sitePackages}")
];
postConfigure = ''
@ -105,11 +109,6 @@ stdenv.mkDerivation (finalAttrs: {
ninja doc
'';
postFixup = ''
mkdir -p $python/lib
mv $out/lib/python* $python/lib/
'';
passthru.tests = {
kea = nixosTests.kea;
prefix-delegation = nixosTests.systemd-networkd-ipv6-prefix-delegation;
@ -119,6 +118,12 @@ stdenv.mkDerivation (finalAttrs: {
networking-networkd = lib.recurseIntoAttrs {
inherit (nixosTests.networking.networkd) dhcpDefault dhcpSimple dhcpOneIf;
};
version = testers.testVersion {
package = kea;
command = "kea-shell -v";
version = finalAttrs.version;
};
};
meta = {