Skip to content

Commit

Permalink
Fix for cross compile
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Sep 5, 2022
1 parent 204296f commit a39ad04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions overlays/cabal-pkg-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit a39ad04

Please sign in to comment.