about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix26
1 files changed, 8 insertions, 18 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix
index f499512ce532..d2f5471f3672 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-binutils/default.nix
@@ -1,33 +1,23 @@
-{ lib, fetchFromGitHub, rustPlatform, runCommand }:
+{ lib, rustPlatform, fetchCrate }:
 
 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=";
-      };
-    in
-    runCommand "source" { } ''
-      cp -R ${repo} $out
-      chmod -R +w $out
-      cp ${./Cargo.lock} $out/Cargo.lock
-    '';
+  src = fetchCrate {
+    inherit pname version;
+    sha256 = "sha256-1sJ+vi78lZsYEQBDyUzifdiU47R1Z6Y8ejNI9h5U+Ao=";
+  };
 
-  cargoSha256 = "sha256-6du86HxkDQAeIXScXBKuv0j4YZiG4O6IwVIXZnJgTO8=";
+  cargoSha256 = "sha256-kZhxKwSEI24LNJ9lPPjtX5etE0XeqaVN7h3HTzpoAY0=";
 
   meta = with lib; {
-    description = "Cargo subcommands to invoke the LLVM tools shipped with the Rust toolchain.";
+    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)
     '';
     homepage = "https://github.com/rust-embedded/cargo-binutils";
+    changelog = "https://github.com/rust-embedded/cargo-binutils/blob/v${version}/CHANGELOG.md";
     license = with licenses; [ asl20 mit ];
     maintainers = with maintainers; [ stupremee ];
   };