From ec518eb21b59bedf055167ba525174d82867022a Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Tue, 27 Jul 2021 19:11:46 +0200 Subject: [PATCH] cgit: support cross-compilation asciidoc was in the incorrect location, and CC and AR must be set explictly. --- .../git-and-tools/cgit/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/cgit/default.nix b/pkgs/applications/version-management/git-and-tools/cgit/default.nix index f48fe4b1ec4c..a38055d9b219 100644 --- a/pkgs/applications/version-management/git-and-tools/cgit/default.nix +++ b/pkgs/applications/version-management/git-and-tools/cgit/default.nix @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { sha256 = "09lzwa183nblr6l8ib35g2xrjf9wm9yhk3szfvyzkwivdv69c9r2"; }; - nativeBuildInputs = [ pkg-config ] ++ [ python wrapPython ]; + nativeBuildInputs = [ pkg-config asciidoc ] ++ [ python wrapPython ]; buildInputs = [ - openssl zlib asciidoc libxml2 libxslt docbook_xsl luajit + openssl zlib libxml2 libxslt docbook_xsl luajit ]; pythonPath = [ pygments markdown ]; @@ -48,10 +48,15 @@ stdenv.mkDerivation rec { preBuild = '' mkdir -p git tar --strip-components=1 -xf "$gitSrc" -C git - - makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/") ''; + makeFlags = [ + "prefix=$(out)" + "CGIT_SCRIPT_PATH=$out/cgit/" + "CC=${stdenv.cc.targetPrefix}cc" + "AR=${stdenv.cc.targetPrefix}ar" + ]; + # Install manpage. postInstall = '' # xmllint fails: