···1-{ lib, fetchFromGitHub, rustPlatform, runCommand }:
23rustPlatform.buildRustPackage rec {
4 pname = "cargo-binutils";
5 version = "0.3.3";
67- # Upstream doesn't commit `Cargo.lock`, see https://github.com/rust-embedded/cargo-binutils/pull/99
8- src =
9- let
10- repo = fetchFromGitHub {
11- owner = "rust-embedded";
12- repo = pname;
13- rev = "v${version}";
14- sha256 = "sha256-Dgn+f4aSsDSh+RC8yvt3ydkdtwib5jEVsnZkod5c7Vo=";
15- };
16- in
17- runCommand "source" { } ''
18- cp -R ${repo} $out
19- chmod -R +w $out
20- cp ${./Cargo.lock} $out/Cargo.lock
21- '';
2223- cargoSha256 = "sha256-6du86HxkDQAeIXScXBKuv0j4YZiG4O6IwVIXZnJgTO8=";
2425 meta = with lib; {
26- description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain.";
27 longDescription = ''
28 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)
29 '';
30 homepage = "https://github.com/rust-embedded/cargo-binutils";
031 license = with licenses; [ asl20 mit ];
32 maintainers = with maintainers; [ stupremee ];
33 };
···1+{ lib, rustPlatform, fetchCrate }:
23rustPlatform.buildRustPackage rec {
4 pname = "cargo-binutils";
5 version = "0.3.3";
67+ src = fetchCrate {
8+ inherit pname version;
9+ sha256 = "sha256-1sJ+vi78lZsYEQBDyUzifdiU47R1Z6Y8ejNI9h5U+Ao=";
10+ };
000000000001112+ cargoSha256 = "sha256-kZhxKwSEI24LNJ9lPPjtX5etE0XeqaVN7h3HTzpoAY0=";
1314 meta = with lib; {
15+ description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain";
16 longDescription = ''
17 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)
18 '';
19 homepage = "https://github.com/rust-embedded/cargo-binutils";
20+ changelog = "https://github.com/rust-embedded/cargo-binutils/blob/v${version}/CHANGELOG.md";
21 license = with licenses; [ asl20 mit ];
22 maintainers = with maintainers; [ stupremee ];
23 };