librsvg: fix binfmt cross-compiling

librsvg-aarch64-unknown-linux-gnu> error: linker `cc` not found
librsvg-aarch64-unknown-linux-gnu>   |
librsvg-aarch64-unknown-linux-gnu>   = note: No such file or directory (os error 2)
librsvg-aarch64-unknown-linux-gnu> error: could not compile `librsvg` due to previous error
librsvg-aarch64-unknown-linux-gnu> make[2]: *** [Makefile:1572: /build/librsvg-2.52.0/target/aarch64-unknown-linux-gnu/release/rsvg-convert] Error 101
This commit is contained in:
Artturin 2021-10-22 05:41:10 +03:00
parent f7effe330a
commit 6d3ae933f4

View file

@ -105,6 +105,9 @@ stdenv.mkDerivation rec {
# Fix thumbnailer path
sed -e "s#@bindir@\(/gdk-pixbuf-thumbnailer\)#${gdk-pixbuf}/bin\1#g" \
-i gdk-pixbuf-loader/librsvg.thumbnailer.in
# 'error: linker `cc` not found' when cross-compiling
export RUSTFLAGS="-Clinker=$CC"
'';
# Not generated when cross compiling.