diff options
Diffstat (limited to 'pkgs/servers/samba/4.x.nix')
-rw-r--r-- | pkgs/servers/samba/4.x.nix | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index e2a9345d4c077..1e0f60224b5fc 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -45,9 +45,9 @@ , enableRegedit ? true, ncurses , enableCephFS ? false, ceph , enableGlusterFS ? false, glusterfs, libuuid -, enableAcl ? (!stdenv.isDarwin), acl -, enableLibunwind ? (!stdenv.isDarwin), libunwind -, enablePam ? (!stdenv.isDarwin), pam +, enableAcl ? (!stdenv.hostPlatform.isDarwin), acl +, enableLibunwind ? (!stdenv.hostPlatform.isDarwin), libunwind +, enablePam ? (!stdenv.hostPlatform.isDarwin), pam }: let @@ -100,10 +100,10 @@ stdenv.mkDerivation (finalAttrs: { docbook_xml_dtd_45 cmocka rpcsvc-proto - ] ++ optionals stdenv.isLinux [ + ] ++ optionals stdenv.hostPlatform.isLinux [ buildPackages.stdenv.cc ] ++ optional (stdenv.buildPlatform != stdenv.hostPlatform) samba # asn1_compile/compile_et - ++ optionals stdenv.isDarwin [ + ++ optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -124,16 +124,16 @@ stdenv.mkDerivation (finalAttrs: { libtasn1 tdb libxcrypt - ] ++ optionals stdenv.isLinux [ liburing systemd ] - ++ optionals stdenv.isDarwin [ libiconv ] + ] ++ optionals stdenv.hostPlatform.isLinux [ liburing systemd ] + ++ optionals stdenv.hostPlatform.isDarwin [ libiconv ] ++ optionals enableLDAP [ openldap.dev python3Packages.markdown ] - ++ optionals (!enableLDAP && stdenv.isLinux) [ ldb talloc tevent ] - ++ optional (enablePrinting && stdenv.isLinux) cups + ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ ldb talloc tevent ] + ++ optional (enablePrinting && stdenv.hostPlatform.isLinux) cups ++ optional enableMDNS avahi ++ optionals enableDomainController [ gpgme lmdb python3Packages.dnspython ] ++ optional enableRegedit ncurses - ++ optional (enableCephFS && stdenv.isLinux) (lib.getDev ceph) - ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ] + ++ optional (enableCephFS && stdenv.hostPlatform.isLinux) (lib.getDev ceph) + ++ optionals (enableGlusterFS && stdenv.hostPlatform.isLinux) [ glusterfs libuuid ] ++ optional enableAcl acl ++ optional enableLibunwind libunwind ++ optional enablePam pam; @@ -165,7 +165,7 @@ stdenv.mkDerivation (finalAttrs: { ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" - ] ++ optionals (!enableLDAP && stdenv.isLinux) [ + ] ++ optionals (!enableLDAP && stdenv.hostPlatform.isLinux) [ "--bundled-libraries=!ldb,!pyldb-util!talloc,!pytalloc-util,!tevent,!tdb,!pytdb" ] ++ optional enableLibunwind "--with-libunwind" ++ optional enableProfiling "--with-profiling-data" @@ -212,12 +212,12 @@ stdenv.mkDerivation (finalAttrs: { read -r -d "" SCRIPT << EOF || true [ -z "\$SAMBA_LIBS" ] && exit 1; BIN='{}'; - '' + lib.optionalString stdenv.isLinux '' + '' + lib.optionalString stdenv.hostPlatform.isLinux '' OLD_LIBS="\$(patchelf --print-rpath "\$BIN" 2>/dev/null | tr ':' '\n')"; ALL_LIBS="\$(echo -e "\$SAMBA_LIBS\n\$OLD_LIBS" | sort | uniq | tr '\n' ':')"; patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?; patchelf --shrink-rpath "\$BIN"; - '' + lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -id \$BIN \$BIN for old_rpath in \$(otool -L \$BIN | grep /private/tmp/ | awk '{print \$1}'); do new_rpath=\$(find \$SAMBA_LIBS -name \$(basename \$old_rpath) | head -n 1) |