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>
This commit is contained in:
parent
b14d8bae27
commit
b5a137b2a0
|
@ -8,6 +8,7 @@
|
||||||
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
|
||||||
, perlSupport ? true
|
, perlSupport ? true
|
||||||
, nlsSupport ? true
|
, nlsSupport ? true
|
||||||
|
, osxkeychainSupport ? stdenv.isDarwin
|
||||||
, guiSupport
|
, guiSupport
|
||||||
, withManual ? true
|
, withManual ? true
|
||||||
, pythonSupport ? true
|
, pythonSupport ? true
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
, gzip # needed at runtime by gitweb.cgi
|
, gzip # needed at runtime by gitweb.cgi
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert osxkeychainSupport -> stdenv.isDarwin;
|
||||||
assert sendEmailSupport -> perlSupport;
|
assert sendEmailSupport -> perlSupport;
|
||||||
assert svnSupport -> perlSupport;
|
assert svnSupport -> perlSupport;
|
||||||
|
|
||||||
|
@ -115,7 +117,7 @@ stdenv.mkDerivation {
|
||||||
make -C contrib/subtree
|
make -C contrib/subtree
|
||||||
'' + (lib.optionalString perlSupport ''
|
'' + (lib.optionalString perlSupport ''
|
||||||
make -C contrib/diff-highlight
|
make -C contrib/diff-highlight
|
||||||
'') + (lib.optionalString stdenv.isDarwin ''
|
'') + (lib.optionalString osxkeychainSupport ''
|
||||||
make -C contrib/credential/osxkeychain
|
make -C contrib/credential/osxkeychain
|
||||||
'') + (lib.optionalString withLibsecret ''
|
'') + (lib.optionalString withLibsecret ''
|
||||||
make -C contrib/credential/libsecret
|
make -C contrib/credential/libsecret
|
||||||
|
@ -129,7 +131,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
installFlags = [ "NO_INSTALL_HARDLINKS=1" ];
|
installFlags = [ "NO_INSTALL_HARDLINKS=1" ];
|
||||||
|
|
||||||
preInstall = (lib.optionalString stdenv.isDarwin ''
|
preInstall = (lib.optionalString osxkeychainSupport ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s $out/share/git/contrib/credential/osxkeychain/git-credential-osxkeychain $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
|
rm -f $PWD/contrib/credential/osxkeychain/git-credential-osxkeychain.o
|
||||||
|
@ -248,8 +250,8 @@ stdenv.mkDerivation {
|
||||||
notSupported "$out/$prog"
|
notSupported "$out/$prog"
|
||||||
done
|
done
|
||||||
'')
|
'')
|
||||||
+ lib.optionalString stdenv.isDarwin ''
|
+ lib.optionalString osxkeychainSupport ''
|
||||||
# enable git-credential-osxkeychain by default if darwin
|
# enable git-credential-osxkeychain on darwin if desired (default)
|
||||||
mkdir -p $out/etc
|
mkdir -p $out/etc
|
||||||
cat > $out/etc/gitconfig << EOF
|
cat > $out/etc/gitconfig << EOF
|
||||||
[credential]
|
[credential]
|
||||||
|
|
Loading…
Reference in New Issue