diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-04-26 17:21:58 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2009-04-26 17:21:58 +0000 |
commit | 914f2d6cf65343fc4bf9ecbed634bb014b8b64a7 (patch) | |
tree | f699637086dc8697f0cc032c087a2d9b3e4a3575 /pkgs/servers | |
parent | 09fd56cc9eb4758920079ff5826b3e9fd92ddab7 (diff) | |
parent | b3d965858b71754b44f7d434175e1ef05bb07412 (diff) | |
download | nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar.gz nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar.bz2 nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar.lz nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar.xz nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.tar.zst nixlib-914f2d6cf65343fc4bf9ecbed634bb014b8b64a7.zip |
* Last sync.
svn path=/nixpkgs/branches/stdenv-updates/; revision=15320
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/samba/default.nix | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/pkgs/servers/samba/default.nix b/pkgs/servers/samba/default.nix index 0464943f8369..64b7c5fc7de4 100644 --- a/pkgs/servers/samba/default.nix +++ b/pkgs/servers/samba/default.nix @@ -1,5 +1,15 @@ { stdenv, fetchurl, readline, pam, openldap, kerberos, popt , iniparser, libunwind, fam, acl + +# Eg. smbclient and smbspool require a smb.conf file. +# If you set configDir to "" an empty configuration file +# $out/lib/smb.conf is is created for you. +# +# configDir defaults to "/etc/samba" so that smbpassword picks up +# the location of its passwd db files from the system configuration file +# /etc/samba/smb.conf. That's why nixos touches /etc/samba/smb.conf even if you +# don't enable the samba upstart service. +, configDir ? "/etc/samba" }: stdenv.mkDerivation rec { @@ -14,11 +24,14 @@ stdenv.mkDerivation rec { preConfigure = "cd source"; - # Provide a dummy smb.conf to shut up programs like smbclient and smbspool. - postInstall = '' - touch $out/lib/smb.conf - ''; - + postInstall = if configDir == "" + then "touch $out/lib/smb.conf" + else ""; + + + # Don't pass --with-private-dir=/var/samba/private + # --with-lockdir=/var/samba/lock + # the build system will try to create it. configureFlags = '' --with-pam --with-cifsmount @@ -26,6 +39,7 @@ stdenv.mkDerivation rec { --with-pam_smbpass --disable-swat --enable-shared-libs + --with-configdir=${configDir} ${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" else ""} ''; } |