anchor.diff:  
     installFlags = [ "NO_INSTALL_HARDLINKS=1" ];
   
  -  preInstall = (lib.optionalString stdenv.isDarwin ''
  +  preInstall = (lib.optionalString osxkeychainSupport ''
       mkdir -p $out/bin
       ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin/
       rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o
  
positive.code:          notSupported "$out/$prog"
         done
       '')
     + lib.optionalString stdenv.isDarwin ''
      # enable git-credential-osxkeychain by default if darwin
      mkdir -p $out/etc
      cat > $out/etc/gitconfig << EOF
      [credential]
  
negative.code:     make -C contrib/subtree
    '' + (lib.optionalString perlSupport ''
      make -C contrib/diff-highlight
    '') + (lib.optionalString osxkeychainSupport ''
      make -C contrib/credential/osxkeychain
    '') + (lib.optionalString withLibsecret ''
      make -C contrib/credential/libsecret
  