anchor.diff: -{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, attr, bzip2, which, file
  +{ stdenv, fetchurl, pkgconfig, pcre, libxml2, zlib, bzip2, which, file
   , openssl, enableMagnet ? false, lua5_1 ? null
   , enableMysql ? false, mysql ? null
   , enableLdap ? false, openldap ? null
   , enableWebDAV ? false, sqlite ? null, libuuid ? null
  +, enableExtendedAttrs ? false, attr ? null
   , perl
   }:
   
  
positive.code:                 ++ stdenv.lib.optional enableMysql "--with-mysql"
                  ++ stdenv.lib.optional enableLdap "--with-ldap"
                  ++ stdenv.lib.optional enableWebDAV "--with-webdav-props"
                  ++ stdenv.lib.optional enableWebDAV "--with-webdav-locks";
  
    preConfigure = ''
      sed -i "s:/usr/bin/file:${file}/bin/file:g" configure
  
negative.code:   '';
  
    nativeBuildInputs = [ pkgconfig ];
    buildInputs = [ pcre libxml2 zlib bzip2 which file openssl ]
               ++ stdenv.lib.optional enableMagnet lua5_1
               ++ stdenv.lib.optional enableMysql mysql.connector-c
               ++ stdenv.lib.optional enableLdap openldap
  