@ -8,6 +8,7 @@
, svnSupport , subversionClient , perlLibs , smtpPerlLibs
, perlSupport ? true
, nlsSupport ? true
, osxkeychainSupport ? stdenv . isDarwin
, guiSupport
, withManual ? true
, pythonSupport ? true
@ -19,6 +20,7 @@
, gzip # needed at runtime by gitweb.cgi
} :
assert osxkeychainSupport -> stdenv . isDarwin ;
assert sendEmailSupport -> perlSupport ;
assert svnSupport -> perlSupport ;
@ -115,7 +117,7 @@ stdenv.mkDerivation {
make - C contrib/subtree
'' + ( l i b . o p t i o n a l S t r i n g p e r l S u p p o r t ''
make - C contrib/diff-highlight
'' ) + ( l i b . o p t i o n a l S t r i n g s t d e n v . i s D a r w i n ''
'' ) + ( l i b . o p t i o n a l S t r i n g o s x k e y c h a i n S u p p o r t ''
make - C contrib/credential/osxkeychain
'' ) + ( l i b . o p t i o n a l S t r i n g w i t h L i b s e c r e t ''
make - C contrib/credential/libsecret
@ -129,7 +131,7 @@ stdenv.mkDerivation {
installFlags = [ " N O _ I N S T A L L _ H A R D L I N K S = 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
@ -248,8 +250,8 @@ stdenv.mkDerivation {
notSupported " $ o u t / $ p r o g "
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 ]