From a7165edc427fbe795e356ccacdbf0e34d9ce7796 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Sat, 6 Jul 2024 12:11:11 -0700 Subject: [PATCH] fix: broken sssd and freeipa packages --- ci/packages.nix | 3 ++- overlays/krb5.nix | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/ci/packages.nix b/ci/packages.nix index 9431c9e0..8cf86fd4 100644 --- a/ci/packages.nix +++ b/ci/packages.nix @@ -30,7 +30,8 @@ in { ]; krb5.inputs = [ packages.x86_64-linux.krb5-ldap - legacyPackages.x86_64-linux.pkgs._389-ds-base + legacyPackages.x86_64-linux.pkgs.sssd + legacyPackages.x86_64-linux.pkgs.freeipa ]; openwebrx.inputs = [ packages.x86_64-linux.openwebrxplus diff --git a/overlays/krb5.nix b/overlays/krb5.nix index 3b284b8c..10df2e0d 100644 --- a/overlays/krb5.nix +++ b/overlays/krb5.nix @@ -4,4 +4,26 @@ in { krb5-ldap = final.krb5.override { withLdap = true; }; + + sssd = let + inherit (prev) sssd; + sssd'py311 = sssd.override { + python3 = final.python311; + }; + isBroken = !(builtins.tryEval sssd.outPath).success; + warnFixed = lib.warnIf (lib.versionAtLeast final.python3.version "3.12") "python-ldap overlay fix no longer needed"; + in if isBroken then sssd'py311 else warnFixed sssd; + + freeipa = let + inherit (prev) freeipa; + freeipa'py311 = (freeipa.override { + python3 = final.python311; + }).overrideAttrs (old: { + nativeBuildInputs = [ + final.python311 + ] ++ old.nativeBuildInputs; + }); + isBroken = !(builtins.tryEval freeipa.outPath).success; + warnFixed = lib.warnIf (lib.versionAtLeast final.python3.version "3.12") "python-ldap overlay fix no longer needed"; + in if isBroken then freeipa'py311 else warnFixed freeipa; }