From 399f6ddab42def8c320a665bc63c08bae4404656 Mon Sep 17 00:00:00 2001 From: figsoda Date: Wed, 22 Sep 2021 11:20:43 -0400 Subject: [PATCH] rust-code-analysis: init at 0.0.23 --- .../tools/rust-code-analysis/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/tools/rust-code-analysis/default.nix diff --git a/pkgs/development/tools/rust-code-analysis/default.nix b/pkgs/development/tools/rust-code-analysis/default.nix new file mode 100644 index 000000000000..d0c9d56a25e6 --- /dev/null +++ b/pkgs/development/tools/rust-code-analysis/default.nix @@ -0,0 +1,28 @@ +{ lib, rustPlatform, fetchFromGitHub }: + +rustPlatform.buildRustPackage rec { + pname = "rust-code-analysis"; + version = "0.0.23"; + + src = fetchFromGitHub { + owner = "mozilla"; + repo = pname; + rev = "v${version}"; + sha256 = "1l9qr5rvbj542fx6g6h9p38z31kvwli39vipbmd3pvic2mpi6mzx"; + }; + + cargoSha256 = "sha256-++d/czDJVGzY8GvBpBKpP0Rum4J4RpT95S81IRUWY2M="; + + cargoBuildFlags = [ "--workspace" ]; + + meta = with lib; { + description = "Analyze and collect metrics on source code"; + homepage = "https://github.com/mozilla/rust-code-analysis"; + license = with licenses; [ + mit # grammars + mpl20 # code + ]; + maintainers = with maintainers; [ figsoda ]; + mainProgram = "rust-code-analysis-cli"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b4042c00101..0d0d9bdc9276 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8840,6 +8840,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + rust-code-analysis = callPackage ../development/tools/rust-code-analysis { }; + rust-petname = callPackage ../tools/text/rust-petname { }; rustscan = callPackage ../tools/security/rustscan {