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.
This commit is contained in:
Reno Dakota 2024-10-25 08:35:56 +00:00 committed by Vladimír Čunát
parent d16edfa996
commit 2a44ea3ed4
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -128,7 +128,7 @@ stdenv.mkDerivation (finalAttrs: {
++ optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ]
++ optionals enableLDAP [ openldap.dev python3Packages.markdown ] ++ optionals enableLDAP [ openldap.dev python3Packages.markdown ]
++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ ldb talloc tevent ] ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ ldb talloc tevent ]
++ optional (enablePrinting && stdenv.hostPlatform.isLinux) cups ++ optional enablePrinting cups
++ optional enableMDNS avahi ++ optional enableMDNS avahi
++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ] ++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ]
++ optional enableRegedit ncurses ++ optional enableRegedit ncurses
@ -160,6 +160,7 @@ stdenv.mkDerivation (finalAttrs: {
"--sysconfdir=/etc" "--sysconfdir=/etc"
"--localstatedir=/var" "--localstatedir=/var"
"--disable-rpath" "--disable-rpath"
(lib.enableFeature enablePrinting "cups")
] ++ optional (!enableDomainController) ] ++ optional (!enableDomainController)
"--without-ad-dc" "--without-ad-dc"
++ optionals (!enableLDAP) [ ++ optionals (!enableLDAP) [