git-credential-osxkeychain

This commit is contained in:
Jude Taylor 2015-09-17 14:43:41 -07:00
parent d78936131a
commit 58fa09a40a
2 changed files with 18 additions and 6 deletions

View File

@ -9,6 +9,7 @@ let
inherit fetchurl stdenv curl openssl zlib expat perl python gettext gnugrep
asciidoc xmlto docbook2x docbook_xsl docbook_xml_dtd_45 libxslt cpio tcl
tk makeWrapper subversionClient gzip libiconv;
inherit (darwin.apple_sdk.frameworks) Security;
texinfo = texinfo5;
svnSupport = false; # for git-svn support
guiSupport = false; # requires tcl/tk

View File

@ -1,6 +1,6 @@
{ fetchurl, stdenv, curl, openssl, zlib, expat, perl, python, gettext, cpio, gnugrep, gzip
, asciidoc, texinfo, xmlto, docbook2x, docbook_xsl, docbook_xml_dtd_45
, libxslt, tcl, tk, makeWrapper, libiconv
, libxslt, tcl, tk, makeWrapper, libiconv, Security
, svnSupport, subversionClient, perlLibs, smtpPerlLibs
, guiSupport
, withManual ? true
@ -28,10 +28,19 @@ stdenv.mkDerivation {
./ssl-cert-file.patch
];
__impureHostDeps = [
"/System/Library/Frameworks/Security.framework/Versions/A/Security"
];
buildInputs = [curl openssl zlib expat gettext cpio makeWrapper libiconv]
++ stdenv.lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
docbook_xsl docbook_xml_dtd_45 libxslt ]
++ stdenv.lib.optionals guiSupport [tcl tk];
++ stdenv.lib.optionals guiSupport [tcl tk]
++ stdenv.lib.optional stdenv.isDarwin [ Security ];
postBuild = stdenv.lib.optionalString stdenv.isDarwin ''
make -C contrib/credential/osxkeychain
'';
# required to support pthread_cancel()
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
@ -55,12 +64,14 @@ stdenv.mkDerivation {
}
# Install git-subtree.
pushd contrib/subtree
make
make install ${stdenv.lib.optionalString withManual "install-doc"}
popd
make -C contrib/subtree install ${stdenv.lib.optionalString withManual "install-doc"}
rm -rf contrib/subtree
'' + stdenv.lib.optionalString stdenv.isDarwin ''
install -m 755 contrib/credential/osxkeychain/git-credential-osxkeychain $out/libexec/git-core
rm -rf contrib/credential/osxkeychain
'' + ''
# Install contrib stuff.
mkdir -p $out/share/git
mv contrib $out/share/git/