mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
15 lines
494 B
Nix
15 lines
494 B
Nix
|
{ runCommand, stdenv, lib, pkgsBuildBuild, makeShellWrapper, rustc, ... }:
|
||
|
|
||
|
runCommand "${stdenv.targetPlatform.config}-cargo-${lib.getVersion pkgsBuildBuild.cargo}" {
|
||
|
# 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"
|
||
|
''
|