git: add osxkeychainSupport option (#112503)

in order to be able to disable osxkeychain credential helper if no
wanted / necessary. Keep it `true` by default such that current logic is
not affected.

Signed-off-by: Andreas Schmid <service@aaschmid.de>

authored by

Andreas Schmid and committed by
GitHub
b5a137b2 b14d8bae

+6 -4
+6 -4
pkgs/applications/version-management/git-and-tools/git/default.nix
··· 8 , svnSupport, subversionClient, perlLibs, smtpPerlLibs 9 , perlSupport ? true 10 , nlsSupport ? true 11 , guiSupport 12 , withManual ? true 13 , pythonSupport ? true ··· 19 , gzip # needed at runtime by gitweb.cgi 20 }: 21 22 assert sendEmailSupport -> perlSupport; 23 assert svnSupport -> perlSupport; 24 ··· 115 make -C contrib/subtree 116 '' + (lib.optionalString perlSupport '' 117 make -C contrib/diff-highlight 118 - '') + (lib.optionalString stdenv.isDarwin '' 119 make -C contrib/credential/osxkeychain 120 '') + (lib.optionalString withLibsecret '' 121 make -C contrib/credential/libsecret ··· 129 130 installFlags = [ "NO_INSTALL_HARDLINKS=1" ]; 131 132 - preInstall = (lib.optionalString stdenv.isDarwin '' 133 mkdir -p $out/bin 134 ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin/ 135 rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o ··· 248 notSupported "$out/$prog" 249 done 250 '') 251 - + lib.optionalString stdenv.isDarwin '' 252 - # enable git-credential-osxkeychain by default if darwin 253 mkdir -p $out/etc 254 cat > $out/etc/gitconfig << EOF 255 [credential]
··· 8 , svnSupport, subversionClient, perlLibs, smtpPerlLibs 9 , perlSupport ? true 10 , nlsSupport ? true 11 + , osxkeychainSupport ? stdenv.isDarwin 12 , guiSupport 13 , withManual ? true 14 , pythonSupport ? true ··· 20 , gzip # needed at runtime by gitweb.cgi 21 }: 22 23 + assert osxkeychainSupport -> stdenv.isDarwin; 24 assert sendEmailSupport -> perlSupport; 25 assert svnSupport -> perlSupport; 26 ··· 117 make -C contrib/subtree 118 '' + (lib.optionalString perlSupport '' 119 make -C contrib/diff-highlight 120 + '') + (lib.optionalString osxkeychainSupport '' 121 make -C contrib/credential/osxkeychain 122 '') + (lib.optionalString withLibsecret '' 123 make -C contrib/credential/libsecret ··· 131 132 installFlags = [ "NO_INSTALL_HARDLINKS=1" ]; 133 134 + preInstall = (lib.optionalString osxkeychainSupport '' 135 mkdir -p $out/bin 136 ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $out/bin/ 137 rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o ··· 250 notSupported "$out/$prog" 251 done 252 '') 253 + + lib.optionalString osxkeychainSupport '' 254 + # enable git-credential-osxkeychain on darwin if desired (default) 255 mkdir -p $out/etc 256 cat > $out/etc/gitconfig << EOF 257 [credential]