From a39ad049d509d607d5a0e9aa25fd5d50585aec68 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 6 Sep 2022 11:44:05 +1200 Subject: [PATCH] Fix for cross compile --- overlays/cabal-pkg-config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlays/cabal-pkg-config.nix b/overlays/cabal-pkg-config.nix index 1ced17656a..54ad181597 100644 --- a/overlays/cabal-pkg-config.nix +++ b/overlays/cabal-pkg-config.nix @@ -23,13 +23,13 @@ final: prev: if [[ "\$1" == "--libs" && "\$2" == "--static" ]]; then OUTPUT=\$(mktemp) ERROR=\$(mktemp) - if ${final.pkgconfig}/bin/pkg-config "\$@" >output 2>\$ERROR; then + if $out/bin/${attrs.targetPrefix}${attrs.baseBinName}-wrapped "\$@" >output 2>\$ERROR; then cat \$OUTPUT else echo "--error-pkg-config-static-failed=\$ERROR" fi else - ${final.pkgconfig}/bin/pkg-config "\$@" + $out/bin/${attrs.targetPrefix}${attrs.baseBinName}-wrapped "\$@" fi EOF chmod +x $out/bin/${attrs.targetPrefix}${attrs.baseBinName}