source-highlight: Skip building docs when cross-compiling

source-highlight uses it's own binary to generate documentation.
During cross-compilation, that binary was built for the target
platform architecture, so it can't run on the build host.
This commit is contained in:
Christian Kampka 2020-08-31 13:52:09 +02:00
parent b6ea4f4065
commit cbfc33a9ce
No known key found for this signature in database
GPG key ID: B88E140DB4FE1AA5

View file

@ -12,6 +12,14 @@ stdenv.mkDerivation {
sha256 = "148w47k3zswbxvhg83z38ifi85f9dqcpg7icvvw1cm6bg21x4zrs";
};
# source-highlight uses it's own binary to generate documentation.
# During cross-compilation, that binary was built for the target
# platform architecture, so it can't run on the build host.
patchPhase = stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
substituteInPlace Makefile.in --replace "src doc tests" "src tests"
'';
strictDeps = true;
buildInputs = [ boost ];
configureFlags = [ "--with-boost=${boost.out}" ];