mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
Merge pull request #13514 from abbradar/samba-closure
samba: reduce closure size
This commit is contained in:
commit
a693d5cc99
@ -5,7 +5,6 @@
|
|||||||
, gnutls, libgcrypt, libgpgerror
|
, gnutls, libgcrypt, libgpgerror
|
||||||
, ncurses, libunwind, libibverbs, librdmacm, systemd
|
, ncurses, libunwind, libibverbs, librdmacm, systemd
|
||||||
|
|
||||||
, enableKerberos ? false
|
|
||||||
, enableInfiniband ? false
|
, enableInfiniband ? false
|
||||||
, enableLDAP ? false
|
, enableLDAP ? false
|
||||||
, enablePrinting ? false
|
, enablePrinting ? false
|
||||||
@ -34,10 +33,9 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs =
|
buildInputs =
|
||||||
[ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
|
[ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
|
||||||
docbook_xml_dtd_45 */ readline talloc ntdb tdb tevent ldb popt iniparser
|
docbook_xml_dtd_45 */ readline talloc ntdb tdb tevent ldb popt iniparser
|
||||||
libbsd libarchive zlib acl fam libiconv gettext libunwind
|
libbsd libarchive zlib acl fam libiconv gettext libunwind kerberos
|
||||||
]
|
]
|
||||||
++ optionals stdenv.isLinux [ libaio pam systemd ]
|
++ optionals stdenv.isLinux [ libaio pam systemd ]
|
||||||
++ optional enableKerberos kerberos
|
|
||||||
++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
|
++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
|
||||||
++ optional enableLDAP openldap
|
++ optional enableLDAP openldap
|
||||||
++ optional (enablePrinting && stdenv.isLinux) cups
|
++ optional (enablePrinting && stdenv.isLinux) cups
|
||||||
@ -58,23 +56,22 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--with-static-modules=NONE"
|
[ "--with-static-modules=NONE"
|
||||||
"--with-shared-modules=ALL"
|
"--with-shared-modules=ALL"
|
||||||
|
"--with-system-mitkrb5"
|
||||||
"--enable-fhs"
|
"--enable-fhs"
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
"--bundled-libraries=${if enableKerberos && kerberos != null &&
|
"--bundled-libraries=NONE"
|
||||||
kerberos.implementation == "heimdal" then "NONE" else "com_err"}"
|
|
||||||
"--private-libraries=NONE"
|
"--private-libraries=NONE"
|
||||||
"--builtin-libraries=replace"
|
"--builtin-libraries=NONE"
|
||||||
]
|
]
|
||||||
++ optional (enableKerberos && kerberos != null &&
|
|
||||||
kerberos.implementation == "krb5") "--with-system-mitkrb5"
|
|
||||||
++ optional (!enableDomainController) "--without-ad-dc"
|
++ optional (!enableDomainController) "--without-ad-dc"
|
||||||
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
|
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
stripAllList = [ "bin" "sbin" ];
|
# Some libraries don't have /lib/samba in RPATH but need it.
|
||||||
|
# Use find -type f -executable -exec echo {} \; -exec sh -c 'ldd {} | grep "not found"' \;
|
||||||
|
# Looks like a bug in installer scripts.
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
|
export SAMBA_LIBS="$(find $out -type f -name \*.so -exec dirname {} \; | sort | uniq)"
|
||||||
read -r -d "" SCRIPT << EOF || true
|
read -r -d "" SCRIPT << EOF || true
|
||||||
@ -85,7 +82,7 @@ stdenv.mkDerivation rec {
|
|||||||
patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?;
|
patchelf --set-rpath "\$ALL_LIBS" "\$BIN" 2>/dev/null || exit $?;
|
||||||
patchelf --shrink-rpath "\$BIN";
|
patchelf --shrink-rpath "\$BIN";
|
||||||
EOF
|
EOF
|
||||||
find $out -type f -exec $SHELL -c "$SCRIPT" \;
|
find $out -type f -name \*.so -exec $SHELL -c "$SCRIPT" \;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -9827,7 +9827,6 @@ let
|
|||||||
|
|
||||||
samba4 = callPackage ../servers/samba/4.x.nix {
|
samba4 = callPackage ../servers/samba/4.x.nix {
|
||||||
python = python2;
|
python = python2;
|
||||||
kerberos = null; # Bundle kerberos because samba uses internal, non-stable functions
|
|
||||||
# enableLDAP
|
# enableLDAP
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user