3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix

35 lines
1.2 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, rustPlatform, runCommand }:
2021-01-19 09:55:54 +00:00
rustPlatform.buildRustPackage rec {
pname = "cargo-binutils";
version = "0.3.3";
# Upstream doesn't commit `Cargo.lock`, see https://github.com/rust-embedded/cargo-binutils/pull/99
src =
let
repo = fetchFromGitHub {
owner = "rust-embedded";
repo = pname;
rev = "v${version}";
sha256 = "sha256-Dgn+f4aSsDSh+RC8yvt3ydkdtwib5jEVsnZkod5c7Vo=";
};
2021-05-10 01:04:10 +01:00
in
runCommand "source" { } ''
cp -R ${repo} $out
chmod -R +w $out
cp ${./Cargo.lock} $out/Cargo.lock
'';
2021-01-19 09:55:54 +00:00
cargoSha256 = "sha256-6du86HxkDQAeIXScXBKuv0j4YZiG4O6IwVIXZnJgTO8=";
2021-01-19 09:55:54 +00:00
meta = with lib; {
2021-05-10 01:04:10 +01:00
description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain.";
longDescription = ''
In order for this to work, you either need to run `rustup component add llvm-tools-preview` or install the `llvm-tools-preview` component using your Nix library (e.g. nixpkgs-mozilla, or rust-overlay)
'';
2021-01-19 09:55:54 +00:00
homepage = "https://github.com/rust-embedded/cargo-binutils";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ stupremee ];
};
}