nixUnstable: fix cross by disabling documentation

The documentation for Nix HEAD now requires running the generated Nix
binary, so we can't cross-build it. :(

https://github.com/NixOS/nix/issues/4622
This commit is contained in:
Alyssa Ross 2021-06-05 08:56:28 +00:00
parent b94e1977e0
commit 2d641a29ab

View file

@ -24,6 +24,8 @@ common =
, withLibseccomp ? lib.meta.availableOn stdenv.hostPlatform libseccomp, libseccomp
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
, enableStatic ? stdenv.hostPlatform.isStatic
, enableDocumentation ? lib.versionOlder version "2.4pre" ||
stdenv.hostPlatform == stdenv.buildPlatform
, pname, version, suffix ? "", src
, patches ? [ ]
}:
@ -36,16 +38,20 @@ common =
VERSION_SUFFIX = suffix;
outputs = [ "out" "dev" "man" "doc" ];
outputs =
[ "out" "dev" ]
++ lib.optionals enableDocumentation [ "man" "doc" ];
nativeBuildInputs =
[ pkg-config ]
++ lib.optionals stdenv.isLinux [ util-linuxMinimal ]
++ lib.optionals (is24 && enableDocumentation) [
(lib.getBin lowdown) mdbook
]
++ lib.optionals is24
[ autoreconfHook
autoconf-archive
bison flex
(lib.getBin lowdown) mdbook
jq
];
@ -118,6 +124,7 @@ common =
"--sysconfdir=${confDir}"
"--enable-gc"
]
++ lib.optional (!enableDocumentation) "--disable-doc-gen"
++ lib.optionals (!is24) [
# option was removed in 2.4
"--disable-init-state"
@ -160,7 +167,7 @@ common =
license = lib.licenses.lgpl2Plus;
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.unix;
outputsToInstall = [ "out" "man" ];
outputsToInstall = [ "out" ] ++ lib.optional enableDocumentation "man";
};
passthru = {