nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitLab,
5 versionCheckHook,
6 nix-update-script,
7}:
8rustPlatform.buildRustPackage (finalAttrs: {
9 pname = "cargo-sonar";
10 version = "1.3.1";
11
12 src = fetchFromGitLab {
13 owner = "woshilapin";
14 repo = "cargo-sonar";
15 tag = finalAttrs.version;
16 hash = "sha256-QK5hri+H1sphk+/0gU5iGrFo6POP/sobq0JL7Q+rJcc=";
17 };
18
19 cargoHash = "sha256-d6LXzWjt2Esbxje+gc8gRA72uxHE2kTUNKdhDlAP0K0=";
20
21 doInstallCheck = true;
22 nativeInstallCheckInputs = [ versionCheckHook ];
23
24 passthru.updateScript = nix-update-script { };
25
26 meta = {
27 description = "Utility to produce some Sonar-compatible format from different Rust tools like cargo-clippy cargo-audit or cargo-outdated";
28 mainProgram = "cargo-sonar";
29 homepage = "https://gitlab.com/woshilapin/cargo-sonar";
30 license = [ lib.licenses.mit ];
31 maintainers = [ lib.maintainers.jonboh ];
32 };
33})