git: fix darwin to linux cross-compilation (#348010)
This commit is contained in:
commit
d9bac064aa
@ -20,6 +20,7 @@
|
|||||||
, gzip # needed at runtime by gitweb.cgi
|
, gzip # needed at runtime by gitweb.cgi
|
||||||
, withSsh ? false
|
, withSsh ? false
|
||||||
, sysctl
|
, sysctl
|
||||||
|
, deterministic-host-uname # trick Makefile into targeting the host platform when cross-compiling
|
||||||
, doInstallCheck ? !stdenv.hostPlatform.isDarwin # extremely slow on darwin
|
, doInstallCheck ? !stdenv.hostPlatform.isDarwin # extremely slow on darwin
|
||||||
, tests
|
, tests
|
||||||
}:
|
}:
|
||||||
@ -84,7 +85,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ gettext perlPackages.perl makeWrapper pkg-config ]
|
nativeBuildInputs = [ deterministic-host-uname gettext perlPackages.perl makeWrapper pkg-config ]
|
||||||
++ lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
|
++ lib.optionals withManual [ asciidoc texinfo xmlto docbook2x
|
||||||
docbook_xsl docbook_xml_dtd_45 libxslt ];
|
docbook_xsl docbook_xml_dtd_45 libxslt ];
|
||||||
buildInputs = [ curl openssl zlib expat cpio (if stdenv.hostPlatform.isFreeBSD then libiconvReal else libiconv) bash ]
|
buildInputs = [ curl openssl zlib expat cpio (if stdenv.hostPlatform.isFreeBSD then libiconvReal else libiconv) bash ]
|
||||||
@ -130,8 +131,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
# acceptable version.
|
# acceptable version.
|
||||||
#
|
#
|
||||||
# See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706
|
# See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin "TKFRAMEWORK=/nonexistent"
|
++ lib.optional stdenv.hostPlatform.isDarwin "TKFRAMEWORK=/nonexistent";
|
||||||
++ lib.optional (stdenv.hostPlatform.isFreeBSD && stdenv.hostPlatform != stdenv.buildPlatform) "uname_S=FreeBSD";
|
|
||||||
|
|
||||||
disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||||
stdenv.shellPackage
|
stdenv.shellPackage
|
||||||
|
@ -31,7 +31,7 @@ substituteAll {
|
|||||||
then "GNU/Linux"
|
then "GNU/Linux"
|
||||||
else if forPlatform.isDarwin
|
else if forPlatform.isDarwin
|
||||||
then "Darwin" # darwin isn't in host-os.m4 so where does this come from?
|
then "Darwin" # darwin isn't in host-os.m4 so where does this come from?
|
||||||
else if stdenv.buildPlatform.isFreeBSD
|
else if forPlatform.isFreeBSD
|
||||||
then "FreeBSD"
|
then "FreeBSD"
|
||||||
else "unknown";
|
else "unknown";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user