From 2a44ea3ed4a8a0c628d991c02ad154c3cee3e4a2 Mon Sep 17 00:00:00 2001 From: Reno Dakota <170618376+paparodeo@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:35:56 +0000 Subject: [PATCH] samba: fix darwin the cups headers are part of the sdk but the library is not, which causes configure to detect cups but the build fails with a link error. explicitly enable / disable cups based on `enablePrinting` flag. --- pkgs/servers/samba/4.x.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 1e0f60224b5f..ae7a489d4b35 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -128,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ optionals enableLDAP [ openldap.dev python3Packages.markdown ] ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ ldb talloc tevent ] - ++ optional (enablePrinting && stdenv.hostPlatform.isLinux) cups + ++ optional enablePrinting cups ++ optional enableMDNS avahi ++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ] ++ optional enableRegedit ncurses @@ -160,6 +160,7 @@ stdenv.mkDerivation (finalAttrs: { "--sysconfdir=/etc" "--localstatedir=/var" "--disable-rpath" + (lib.enableFeature enablePrinting "cups") ] ++ optional (!enableDomainController) "--without-ad-dc" ++ optionals (!enableLDAP) [