Luke Granger-Brown
57725ef3ec
git-subtree-dir: third_party/nixpkgs git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
14 lines
494 B
Nix
14 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"
|
|
''
|