From 78c018ba8e71998ae1402602a000d880f3a5d51f Mon Sep 17 00:00:00 2001 From: Jorge Acereda Date: Wed, 17 Apr 2019 22:50:08 +0200 Subject: [PATCH 1/2] samba: fix darwin build --- pkgs/servers/samba/4.x.nix | 7 ++++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index 7d1289ffdea2..b00ed260370d 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl +{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl, rpcgen , fetchpatch , docbook_xml_dtd_42, readline , popt, iniparser, libbsd, libarchive, libiconv, gettext @@ -36,6 +36,8 @@ stdenv.mkDerivation rec { ./4.x-fix-makeflags-parsing.patch ]; + nativeBuildInputs = optional stdenv.isDarwin rpcgen; + buildInputs = [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /* docbook_xml_dtd_45 */ readline popt iniparser jansson @@ -60,6 +62,9 @@ stdenv.mkDerivation rec { sed -i "s,\(XML_CATALOG_FILES=\"\),\1$XML_CATALOG_FILES ,g" buildtools/wafsamba/wafsamba.py patchShebangs ./buildtools/bin + '' + optionalString stdenv.isDarwin '' + substituteInPlace libcli/dns/wscript_build \ + --replace "bld.SAMBA_BINARY('resolvconftest'" "True or bld.SAMBA_BINARY('resolvconftest'" ''; configureFlags = diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c4d999e8e9e8..cb217481fe75 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14369,6 +14369,7 @@ in samba3 = callPackage ../servers/samba/3.x.nix { }; samba4 = callPackage ../servers/samba/4.x.nix { + rpcgen = netbsd.rpcgen; python = python3; }; From b172ff55e3da70c67d47d7780640ba4c43d7ff27 Mon Sep 17 00:00:00 2001 From: Jorge Acereda Date: Sat, 20 Apr 2019 14:33:35 +0200 Subject: [PATCH 2/2] samba: use fixDarwinDylibNames --- pkgs/servers/samba/4.x.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/samba/4.x.nix b/pkgs/servers/samba/4.x.nix index b00ed260370d..f1a86995584a 100644 --- a/pkgs/servers/samba/4.x.nix +++ b/pkgs/servers/samba/4.x.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl, rpcgen -, fetchpatch +, fetchpatch, fixDarwinDylibNames , docbook_xml_dtd_42, readline , popt, iniparser, libbsd, libarchive, libiconv, gettext , krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, fam, libceph, glusterfs @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { ./4.x-fix-makeflags-parsing.patch ]; - nativeBuildInputs = optional stdenv.isDarwin rpcgen; + nativeBuildInputs = optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ]; buildInputs = [ python pkgconfig perl libxslt docbook_xsl docbook_xml_dtd_42 /* @@ -75,6 +75,7 @@ stdenv.mkDerivation rec { "--enable-fhs" "--sysconfdir=/etc" "--localstatedir=/var" + "--disable-rpath" ] ++ [(if enableDomainController then "--with-experimental-mit-ad-dc"