summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorGuillaume Girol <symphorien@users.noreply.github.com>2021-01-17 16:03:35 +0000
committerGitHub <noreply@github.com>2021-01-17 16:03:35 +0000
commit979e6e67d32a934dcc39dedfd588baf6e3f7ed78 (patch)
tree0ff6303c6f95373a92b3b2db63db7072413b4042 /pkgs/tools
parentfab41ed0e622090236e7f6f93ae43c45524c647a (diff)
parentcbfc33a9cec2cfdcb1c1e2394272cbdb9988f85a (diff)
downloadnixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar.gz
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar.bz2
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar.lz
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar.xz
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.tar.zst
nixpkgs-979e6e67d32a934dcc39dedfd588baf6e3f7ed78.zip
Merge pull request #96762 from kampka/source-highlight
source-highlight: Skip building docs when cross-compiling
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/text/source-highlight/default.nix8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/tools/text/source-highlight/default.nix b/pkgs/tools/text/source-highlight/default.nix
index 40cb0398824..3d3a0f8c50a 100644
--- a/pkgs/tools/text/source-highlight/default.nix
+++ b/pkgs/tools/text/source-highlight/default.nix
@@ -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}" ];