about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/samba/4.x.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/samba/4.x.nix')
-rw-r--r--nixpkgs/pkgs/servers/samba/4.x.nix95
1 files changed, 72 insertions, 23 deletions
diff --git a/nixpkgs/pkgs/servers/samba/4.x.nix b/nixpkgs/pkgs/servers/samba/4.x.nix
index d24a9b9748aa..1d6951bb8c1c 100644
--- a/nixpkgs/pkgs/servers/samba/4.x.nix
+++ b/nixpkgs/pkgs/servers/samba/4.x.nix
@@ -1,22 +1,44 @@
-{ lib, stdenv, fetchurl, python, pkgconfig, perl, libxslt, docbook_xsl, rpcgen
+{ stdenv
+, fetchurl
+, python
+, pkgconfig
+, bison
+, flex
+, perl
+, libxslt
+, docbook_xsl
+, rpcgen
 , fixDarwinDylibNames
-, docbook_xml_dtd_42, readline
-, popt, iniparser, libbsd, libarchive, libiconv, gettext
-, krb5Full, zlib, openldap, cups, pam, avahi, acl, libaio, liburing, fam, libceph, glusterfs
-, gnutls, ncurses, libunwind, systemd, jansson, lmdb, gpgme, libuuid
+, docbook_xml_dtd_45
+, readline
+, popt
+, libbsd
+, libarchive
+, zlib
+, liburing
+, fam
+, gnutls
+, libunwind
+, systemd
+, jansson
+, libtasn1
+, tdb
+, cmocka
 
-, enableLDAP ? false
-, enablePrinting ? false
-, enableMDNS ? false
-, enableDomainController ? false
-, enableRegedit ? true
-, enableCephFS ? false
-, enableGlusterFS ? false
-, enableAcl ? (!stdenv.isDarwin)
-, enablePam ? (!stdenv.isDarwin)
+, enableLDAP ? false, openldap
+, enablePrinting ? false, cups
+, enableProfiling ? true
+, enableMDNS ? false, avahi
+, enableDomainController ? false, gpgme, lmdb
+, enableKerberos ? true, krb5Full
+, enableRegedit ? true, ncurses
+, enableCephFS ? false, libceph
+, enableGlusterFS ? false, glusterfs, libuuid
+, enableAcl ? (!stdenv.isDarwin), acl
+, enablePam ? (!stdenv.isDarwin), pam
 }:
 
-with lib;
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   pname = "samba";
@@ -36,17 +58,40 @@ stdenv.mkDerivation rec {
     ./4.x-fix-makeflags-parsing.patch
   ];
 
-  nativeBuildInputs = [ pkgconfig perl perl.pkgs.ParseYapp libxslt docbook_xsl docbook_xml_dtd_42 ]
-  ++ optionals stdenv.isDarwin [ rpcgen fixDarwinDylibNames ];
+  nativeBuildInputs = [
+    pkgconfig
+    bison
+    flex
+    perl
+    perl.pkgs.ParseYapp
+    libxslt
+    docbook_xsl
+    docbook_xml_dtd_45
+    cmocka
+  ] ++ optionals stdenv.isDarwin [
+    rpcgen
+    fixDarwinDylibNames
+  ];
 
   buildInputs = [
-    python readline popt iniparser jansson
-    libbsd libarchive zlib fam libiconv gettext libunwind krb5Full gnutls
-  ] ++ optionals stdenv.isLinux [ libaio liburing systemd ]
+    python
+    readline
+    popt
+    jansson
+    libbsd
+    libarchive
+    zlib
+    fam
+    libunwind
+    gnutls
+    libtasn1
+    tdb
+  ] ++ optionals stdenv.isLinux [ liburing systemd ]
     ++ optional enableLDAP openldap
     ++ optional (enablePrinting && stdenv.isLinux) cups
     ++ optional enableMDNS avahi
     ++ optionals enableDomainController [ gpgme lmdb ]
+    ++ optional enableKerberos krb5Full
     ++ optional enableRegedit ncurses
     ++ optional (enableCephFS && stdenv.isLinux) libceph
     ++ optionals (enableGlusterFS && stdenv.isLinux) [ glusterfs libuuid ]
@@ -66,8 +111,6 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-static-modules=NONE"
     "--with-shared-modules=ALL"
-    "--with-system-mitkrb5"
-    "--with-system-mitkdc" krb5Full
     "--enable-fhs"
     "--sysconfdir=/etc"
     "--localstatedir=/var"
@@ -75,7 +118,13 @@ stdenv.mkDerivation rec {
   ] ++ singleton (if enableDomainController
          then "--with-experimental-mit-ad-dc"
          else "--without-ad-dc")
-    ++ optionals (!enableLDAP) [ "--without-ldap" "--without-ads" ]
+    ++ optionals enableKerberos [
+    "--with-system-mitkrb5"
+    "--with-system-mitkdc=${krb5Full}"
+  ] ++ optionals (!enableLDAP) [
+    "--without-ldap"
+    "--without-ads"
+  ] ++ optional enableProfiling "--with-profiling-data"
     ++ optional (!enableAcl) "--without-acl-support"
     ++ optional (!enablePam) "--without-pam";