2024-05-02 00:46:19 +00:00
|
|
|
{ runCommand, stdenv, lib, pkgsBuildBuild, makeShellWrapper, rustc, ... }:
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
runCommand
|
|
|
|
"${stdenv.targetPlatform.config}-cargo-${lib.getVersion pkgsBuildBuild.cargo}" {
|
2024-05-02 00:46:19 +00:00
|
|
|
# Use depsBuildBuild or it tries to use target-runtimeShell
|
|
|
|
depsBuildBuild = [ makeShellWrapper ];
|
|
|
|
|
|
|
|
inherit (pkgsBuildBuild.cargo) meta;
|
|
|
|
} ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s ${pkgsBuildBuild.cargo}/share $out/share
|
|
|
|
|
|
|
|
makeWrapper "${pkgsBuildBuild.cargo}/bin/cargo" "$out/bin/cargo" \
|
|
|
|
--prefix PATH : "${rustc}/bin"
|
2024-05-13 21:24:10 +00:00
|
|
|
''
|