3
0
Fork 0
forked from mirrors/nixpkgs

samba: support darwin

- add macos patch
This commit is contained in:
Matthew Bauer 2018-06-10 21:15:09 -04:00
parent da038b1bfc
commit b0cb40ed4b

View file

@ -1,4 +1,5 @@
{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl
, fetchpatch
, docbook_xml_dtd_42, docbook_xml_dtd_45, readline, talloc
, popt, iniparser, libbsd, libarchive, libiconv, gettext
, krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs
@ -13,6 +14,8 @@
, enableRegedit ? true
, enableCephFS ? false
, enableGlusterFS ? false
, enableAcl ? (!stdenv.isDarwin)
, enablePam ? (!stdenv.isDarwin)
}:
with lib;
@ -32,14 +35,18 @@ stdenv.mkDerivation rec {
[ ./4.x-no-persistent-install.patch
./patch-source3__libads__kerberos_keytab.c.patch
./4.x-no-persistent-install-dynconfig.patch
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/samba-team/samba/pull/107.patch";
sha256 = "0r6q34vjj0bdzmcbnrkad9rww58k4krbwicv4gs1g3dj49skpvd6";
})
];
buildInputs =
[ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /*
docbook_xml_dtd_45 */ readline talloc popt iniparser
libbsd libarchive zlib acl fam libiconv gettext libunwind krb5Full
libbsd libarchive zlib fam libiconv gettext libunwind krb5Full
]
++ optionals stdenv.isLinux [ libaio pam systemd ]
++ optionals stdenv.isLinux [ libaio systemd ]
++ optionals (enableInfiniband && stdenv.isLinux) [ libibverbs librdmacm ]
++ optional enableLDAP openldap
++ optional (enablePrinting && stdenv.isLinux) cups
@ -47,7 +54,9 @@ stdenv.mkDerivation rec {
++ optional enableDomainController gnutls
++ optional enableRegedit ncurses
++ optional (enableCephFS && stdenv.isLinux) libceph
++ optional (enableGlusterFS && stdenv.isLinux) glusterfs;
++ optional (enableGlusterFS && stdenv.isLinux) glusterfs
++ optional enableAcl acl
++ optional enablePam pam;
postPatch = ''
# Removes absolute paths in scripts
@ -67,7 +76,9 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
]
++ optional (!enableDomainController) "--without-ad-dc"
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ];
++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]
++ optional (!enableAcl) "--without-acl-support"
++ optional (!enablePam) "--without-pam";
# To build in parallel.
buildPhase = "python buildtools/bin/waf build -j $NIX_BUILD_CORES";