forked from mirrors/nixpkgs
samba: support darwin
- add macos patch
This commit is contained in:
parent
da038b1bfc
commit
b0cb40ed4b
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue