anchor.diff:           notSupported "$out/$prog"
          done
        '')
  -   + lib.optionalString stdenv.isDarwin ''
  -    # enable git-credential-osxkeychain by default if darwin
  +   + lib.optionalString osxkeychainSupport ''
  +    # enable git-credential-osxkeychain on darwin if desired (default)
       mkdir -p $out/etc
       cat > $out/etc/gitconfig << EOF
       [credential]
  
positive.code:     make -C contrib/subtree
    '' + (lib.optionalString perlSupport ''
      make -C contrib/diff-highlight
    '') + (lib.optionalString stdenv.isDarwin ''
      make -C contrib/credential/osxkeychain
    '') + (lib.optionalString withLibsecret ''
      make -C contrib/credential/libsecret
  
negative.code: 
    installFlags = [ "NO_INSTALL_HARDLINKS=1" ];
  
    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
  