cross: glycin-loaders: simplify
This commit is contained in:
parent
5615c7cf6e
commit
7e4d6853f5
|
@ -871,57 +871,12 @@ in with final; {
|
||||||
nativeBuildInputs = upstream.nativeBuildInputs ++ [
|
nativeBuildInputs = upstream.nativeBuildInputs ++ [
|
||||||
# fixes: loaders/meson.build:72:7: ERROR: Program 'msgfmt' not found or not executable
|
# fixes: loaders/meson.build:72:7: ERROR: Program 'msgfmt' not found or not executable
|
||||||
buildPackages.gettext
|
buildPackages.gettext
|
||||||
rustPlatform.cargoSetupHook
|
|
||||||
# buildPackages.xz
|
|
||||||
# buildPackages.gnutar
|
|
||||||
];
|
];
|
||||||
cargoVendorDir = "vendor";
|
|
||||||
# dontCargoSetupPostUnpack = true;
|
|
||||||
# mesonFlags = [
|
|
||||||
# "-Dprofile=dev"
|
|
||||||
# "-Dtest_skip_install=true"
|
|
||||||
# ];
|
|
||||||
# fixes: "error: linker `cc` not found"
|
|
||||||
preConfigure = ''
|
|
||||||
# cp .cargo/config $sourceRoot/.cargo/config
|
|
||||||
cp ../.cargo/config .cargo/config
|
|
||||||
export RUST_TARGET="${stdenv.hostPlatform.rust.rustcTargetSpec}"
|
|
||||||
'';
|
|
||||||
# configureFlags = [
|
|
||||||
# "RUST_TARGET=${stdenv.hostPlatform.rust.rustcTarget}"
|
|
||||||
# # "RUSTFLAGS=-Clinker=$CC"
|
|
||||||
# ];
|
|
||||||
# postConfigure = ''
|
|
||||||
# export RUST_TARGET="${stdenv.hostPlatform.rust.rustcTarget}"
|
|
||||||
# export RUSTFLAGS="-Clinker=$CC"
|
|
||||||
# '';
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace loaders/meson.build \
|
substituteInPlace loaders/meson.build \
|
||||||
--replace "cargo_bin, 'build'," "'${cargoEnvWrapper}', cargo_bin, 'build'," \
|
--replace "cargo_bin, 'build'," "'${cargoEnvWrapper}', cargo_bin, 'build'," \
|
||||||
--replace "'loaders' / rust_target" "'loaders' / '${rust.envVars.rustHostPlatformSpec}' / rust_target"
|
--replace "'loaders' / rust_target" "'loaders' / '${rust.envVars.rustHostPlatformSpec}' / rust_target"
|
||||||
'';
|
'';
|
||||||
# postConfigure = ''
|
|
||||||
# echo "source root: $sourceRoot"
|
|
||||||
# export RUSTFLAGS="-Clinker=$CC"
|
|
||||||
# # export RUST_TARGET="${stdenv.hostPlatform.rust.rustcTarget}"
|
|
||||||
# '';
|
|
||||||
# env = let
|
|
||||||
# ccForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc";
|
|
||||||
# cxxForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++";
|
|
||||||
# ccForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
|
|
||||||
# cxxForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
|
|
||||||
# rustBuildPlatform = rust.toRustTarget stdenv.buildPlatform;
|
|
||||||
# rustTargetPlatform = rust.toRustTarget stdenv.hostPlatform;
|
|
||||||
# rustTargetPlatformSpec = rust.toRustTargetSpec stdenv.hostPlatform;
|
|
||||||
# in {
|
|
||||||
# # taken from <pkgs/build-support/rust/hooks/default.nix>
|
|
||||||
# # fixes "cargo:warning=aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’"
|
|
||||||
# # XXX: these aren't necessarily valid environment variables: the referenced nix file is more clever to get them to work.
|
|
||||||
# "CC_${rustBuildPlatform}" = "${ccForBuild}";
|
|
||||||
# "CXX_${rustBuildPlatform}" = "${cxxForBuild}";
|
|
||||||
# "CC_${rustTargetPlatform}" = "${ccForHost}";
|
|
||||||
# "CXX_${rustTargetPlatform}" = "${cxxForHost}";
|
|
||||||
# };
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user