···8181 preBuild = ''
8282 mkdir -p $out/
8383 ln -sv $PWD/lib $out
8484+ ''
8585+ + # This is a good candidate for using the `placeholder` primitive when it's released
8686+ # This should hopefully be unnecessary once
8787+ # https://github.com/NixOS/nixpkgs/pull/25047 is merged
8888+ stdenv.lib.optionalString (buildPlatform != hostPlatform && enableSharedLibraries) ''
8989+ export NIX_CROSS_LDFLAGS="-rpath $lib/lib -rpath $lib/lib64 $NIX_CROSS_LDFLAGS"
8490 '';
85918692 cmakeFlags = with stdenv; [