about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/rust
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/rust')
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-hack/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-llvm-cov/default.nix93
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix15
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-risczero/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-run-bin/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-xbuild/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix6
-rw-r--r--nixpkgs/pkgs/development/tools/rust/leptosfmt/default.nix6
8 files changed, 95 insertions, 49 deletions
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-hack/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-hack/default.nix
index 507ec3a71430..99a1610381e9 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-hack/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-hack/default.nix
@@ -2,14 +2,14 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-hack";
-  version = "0.6.5";
+  version = "0.6.6";
 
   src = fetchCrate {
     inherit pname version;
-    sha256 = "sha256-loGQTCi6lTNB/jn47fvWTqKr01p4xRqyq+Y02a/UwSc=";
+    sha256 = "sha256-yLxWV9/e+0IAe4z11i+wwNb6yUehzQwV+EYCe3Z1MOM=";
   };
 
-  cargoSha256 = "sha256-gk/0aTMlUWYKfJJ9CfTvYLTZ6/ShIRuhpywhuwFHD5E=";
+  cargoSha256 = "sha256-/Za1T+HYI7mmKQHn7qm1d6hqh1qyp9DAOOMi32Tev9g=";
 
   # some necessary files are absent in the crate version
   doCheck = false;
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-llvm-cov/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-llvm-cov/default.nix
index 88b2f2e24406..24e8f458b60b 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-llvm-cov/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-llvm-cov/default.nix
@@ -1,36 +1,76 @@
+# If the tests are broken, it's probably for one of two reasons:
+#
+# 1. The version of llvm used doesn't match the expectations of rustc and/or
+#    cargo-llvm-cov. This is relatively unlikely because we pull llvm out of
+#    rustc's attrset, so it *should* be the right version as long as this is the
+#    case.
+# 2. Nixpkgs has changed its rust infrastructure in a way that causes
+#    cargo-llvm-cov to misbehave under test. It's likely that even though the
+#    tests are failing, cargo-llvm-cov will still function properly in actual
+#    use. This has happened before, and is described [here][0] (along with a
+#    feature request that would fix this instance of the problem).
+#
+# For previous test-troubleshooting discussion, see [here][1].
+#
+# [0]: https://github.com/taiki-e/cargo-llvm-cov/issues/242
+# [1]: https://github.com/NixOS/nixpkgs/pull/197478
+
 { stdenv
 , lib
-, fetchCrate
+, fetchurl
+, fetchFromGitHub
 , rustPlatform
+, rustc
 }:
 
-rustPlatform.buildRustPackage rec {
+let
   pname = "cargo-llvm-cov";
   version = "0.5.31";
 
-  src = fetchCrate {
-    inherit pname version;
-    sha256 = "sha256-HjnP9H1t660PJ5eXzgAhrdDEgqdzzb+9Dbk5RGUPjaQ=";
+  owner = "taiki-e";
+  homepage = "https://github.com/${owner}/${pname}";
+
+  llvm = rustc.llvmPackages.llvm;
+
+  # Download `Cargo.lock` from crates.io so we don't clutter up Nixpkgs
+  cargoLock = fetchurl {
+    name = "Cargo.lock";
+    url = "https://crates.io/api/v1/crates/${pname}/${version}/download";
+    sha256 = "sha256-BbrdyJgZSIz6GaTdQv1GiFHufRBSbcoHcqqEmr/HvAM=";
+    downloadToTemp = true;
+    postFetch = ''
+      tar xzf $downloadedFile ${pname}-${version}/Cargo.lock
+      mv ${pname}-${version}/Cargo.lock $out
+    '';
+  };
+in
+
+rustPlatform.buildRustPackage {
+  inherit pname version;
+
+  # Use `fetchFromGitHub` instead of `fetchCrate` because the latter does not
+  # pull in fixtures needed for the test suite
+  src = fetchFromGitHub {
+    inherit owner;
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-wRo94JVn4InkhrMHFSsEvm2FFIxUsltA57sMMOcL8b0=";
   };
-  cargoSha256 = "sha256-p6zpRRNX4g+jESNSwouWMjZlFhTBFJhe7LirYtFrZ1g=";
-
-  # skip tests which require llvm-tools-preview
-  checkFlags = [
-    "--skip bin_crate"
-    "--skip cargo_config"
-    "--skip clean_ws"
-    "--skip instantiations"
-    "--skip merge"
-    "--skip merge_failure_mode_all"
-    "--skip no_test"
-    "--skip open_report"
-    "--skip real1"
-    "--skip show_env"
-    "--skip virtual1"
-  ];
-
-  meta = rec {
-    homepage = "https://github.com/taiki-e/${pname}";
+
+  # Upstream doesn't include the lockfile so we need to add it back
+  postUnpack = ''
+    cp ${cargoLock} source/Cargo.lock
+  '';
+
+  cargoSha256 = "sha256-XcsognndhHenYnlJCNMbrNh+S8FX7qxXUjuV1j2qsmY=";
+
+  # `cargo-llvm-cov` reads these environment variables to find these binaries,
+  # which are needed to run the tests
+  LLVM_COV = "${llvm}/bin/llvm-cov";
+  LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";
+
+  meta = {
+    inherit homepage;
     changelog = homepage + "/blob/v${version}/CHANGELOG.md";
     description = "Cargo subcommand to easily use LLVM source-based code coverage";
     longDescription = ''
@@ -39,6 +79,9 @@ rustPlatform.buildRustPackage rec {
       library (e.g. fenix or rust-overlay)
     '';
     license = with lib.licenses; [ asl20 /* or */ mit ];
-    maintainers = with lib.maintainers; [ wucke13 matthiasbeyer ];
+    maintainers = with lib.maintainers; [ wucke13 matthiasbeyer CobaltCause ];
+
+    # The profiler runtime is (currently) disabled on non-Linux platforms
+    broken = !(stdenv.isLinux && !stdenv.targetPlatform.isRedox);
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix
index 2677eff21a10..dc58914a2784 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-make/default.nix
@@ -1,6 +1,6 @@
 { lib
 , rustPlatform
-, fetchCrate
+, fetchFromGitHub
 , pkg-config
 , bzip2
 , openssl
@@ -10,14 +10,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-make";
-  version = "0.36.13";
+  version = "0.37.0";
 
-  src = fetchCrate {
-    inherit pname version;
-    hash = "sha256-9EnVO2CJY5y01mxSWphbuTVnckgUr6L8GrFy1nQcqT8=";
+  src = fetchFromGitHub {
+    owner = "sagiegurari";
+    repo = "cargo-make";
+    rev = version;
+    hash = "sha256-gc/0mlhQdE9tnCpDQ2vSWX4WcqnPxRjmL6YPtYGEn5E=";
   };
 
-  cargoHash = "sha256-K6D5e9inuB1y3VcEW73ikrkTcewnZyW7kdHSDkWxC3w=";
+  cargoHash = "sha256-ut9s+kMATtmOfyIp+TwmdQtlObiZexWbh1p1tcCpYGo=";
 
   nativeBuildInputs = [ pkg-config ];
 
@@ -40,5 +42,6 @@ rustPlatform.buildRustPackage rec {
     changelog = "https://github.com/sagiegurari/cargo-make/blob/${version}/CHANGELOG.md";
     license = licenses.asl20;
     maintainers = with maintainers; [ figsoda xrelkd ];
+    mainProgram = "cargo-make";
   };
 }
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-risczero/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-risczero/default.nix
index 2f50f62aab90..1bb68d7bbd98 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-risczero/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-risczero/default.nix
@@ -9,14 +9,14 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-risczero";
-  version = "0.14.0";
+  version = "0.17.0";
 
   src = fetchCrate {
     inherit pname version;
-    sha256 = "sha256-uZz0jJ3klaOrqzJ0BUVDHxl7lv6vt0GT6RgQuJeyeyk=";
+    hash = "sha256-UXCZ4l45zcyn2AnfDW6dNdEnXCWL2waNwDTbermgS6M=";
   };
 
-  cargoSha256 = "sha256-t++3+Ijn1ykjMcMsdoe/1xfaji+DQvhyiFe6M/Bpbt0=";
+  cargoHash = "sha256-KkV+ZQAPegbeZKj3ixDSFQEyKwkKeMYceSc27xGtQms=";
 
   nativeBuildInputs = [
     pkg-config
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-run-bin/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-run-bin/default.nix
index dca10dc1c42a..afe21ea80f59 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-run-bin/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-run-bin/default.nix
@@ -5,14 +5,14 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-run-bin";
-  version = "1.1.5";
+  version = "1.2.0";
 
   src = fetchCrate {
     inherit pname version;
-    sha256 = "sha256-YCWjdY8feiqU4/bOn19qbY8YiKa3SvFImvH0wDKXOhI=";
+    hash = "sha256-roeim5enxqklJOW7Qqr+Gci5lUIOW9kn3tlCm8qrEJk=";
   };
 
-  cargoSha256 = "sha256-mNJZjEkuUwo/aqyotqjNj+P50dFFGaJnLQ2CyCYg/1Y=";
+  cargoHash = "sha256-A/HlFse2wWOH85oZQvlRaePdF/4YfSL3qroDYGwwi9U=";
 
   # multiple impurities in tests
   doCheck = false;
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-xbuild/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-xbuild/default.nix
index 506c71808a05..55911b7f8a62 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-xbuild/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-xbuild/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-xbuild";
-  version = "0.6.5";
+  version = "0.6.6";
 
   src = fetchFromGitHub {
     owner = "rust-osdev";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-bnceN47OFGlxs3ibcKoZFjoTgXRQxA2ZqxnthJ/fsqE=";
+    hash = "sha256-29rCjmzxxIjR5nBN2J3xxP+r8NnPIJV90FkSQQEBbo4=";
   };
 
-  cargoSha256 = "sha256-qMPJC61ZVW9olMgNnGrvcQ/je4se4J5gOVoaOpNMUo8=";
+  cargoHash = "sha256-tyPhKWDSDNxQy+vpWNS5VP5D8TkUR7MJSAlG8wZsDy4=";
 
   meta = with lib; {
     description = "Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc";
diff --git a/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix b/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
index 9da32364d137..cc625347de9d 100644
--- a/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/cargo-zigbuild/default.nix
@@ -2,16 +2,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "cargo-zigbuild";
-  version = "0.17.1";
+  version = "0.17.2";
 
   src = fetchFromGitHub {
     owner = "messense";
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-/3ThQtAQ0pWEIK4cgqYHqoSXtSJB581NLlsH21UNb50=";
+    hash = "sha256-t71h+s97Ip3Gqs7oCzF8GWpTX0p0ltPt7JT61Gk8xF0=";
   };
 
-  cargoHash = "sha256-KUjkiS8TyaKdf1qRfgp2/JMwFGLAFfeTNcGIq+Z6oEU=";
+  cargoHash = "sha256-oJ+zAtTwFSSzwq1gvkRloBj8g30G8Eq7dG2RoaX39lA=";
 
   nativeBuildInputs = [ makeWrapper ];
 
diff --git a/nixpkgs/pkgs/development/tools/rust/leptosfmt/default.nix b/nixpkgs/pkgs/development/tools/rust/leptosfmt/default.nix
index c2dbf742162a..315b90dddd7b 100644
--- a/nixpkgs/pkgs/development/tools/rust/leptosfmt/default.nix
+++ b/nixpkgs/pkgs/development/tools/rust/leptosfmt/default.nix
@@ -5,16 +5,16 @@
 
 rustPlatform.buildRustPackage rec {
   pname = "leptosfmt";
-  version = "0.1.13";
+  version = "0.1.14";
 
   src = fetchFromGitHub {
     owner = "bram209";
     repo = "leptosfmt";
     rev = version;
-    hash = "sha256-QitvZ0AkZcXmjv8EnewWjexQMVEHy/naUarBIrzHbBA=";
+    hash = "sha256-Dj58p//g6sCpZMmTbROrGxs8fiQm4y1WSYqNjQ5K3Oo=";
   };
 
-  cargoHash = "sha256-Fjj4lgkdHeA/3ajNbF1vTf6/YzGvDUJsDmiXzkEpels=";
+  cargoHash = "sha256-epCLbr9Z3o/G0rEiYri0CswZYzjOZkb4UVIO4/vD6ko=";
 
   meta = with lib; {
     description = "A formatter for the leptos view! macro";