Merge pull request #192813 from wucke13/gitlab-tools

Gitlab tools
This commit is contained in:
Lassulus 2022-11-04 12:41:50 +01:00 committed by GitHub
commit ec3c2c40af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
}:
buildPythonPackage rec {
pname = "lcov_cobertura";
version = "2.0.2";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-xs40e/PuZ/jV0CDNZiYmo1lM8r5yfMY0qg0R+j9/E3Q=";
};
doCheck = true;
pythonImportsCheck = [
"lcov_cobertura"
];
meta = {
description = "Converts code coverage from lcov format to Cobertura's XML format";
homepage = "https://eriwen.github.io/lcov-to-cobertura-xml/";
license = lib.licenses.asl20;
};
}

View file

@ -0,0 +1,44 @@
{ stdenv
, lib
, fetchzip
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "cargo-llvm-cov";
version = "0.5.0";
src = fetchzip {
url = "https://crates.io/api/v1/crates/${pname}/${version}/download#${pname}-${version}.tar.gz";
sha256 = "sha256-ifnwiOuFnpryYxLgescpxN8CzgFzSZlY+RlbyW7ND6g=";
};
cargoSha256 = "sha256-11xNgiOw0qysTWpoKAXQ5gx1uJSAsp+aDDir0zpkpeQ=";
# 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}";
changelog = homepage + "/blob/v${version}/CHANGELOG.md";
description = "Cargo subcommand to easily use LLVM source-based code coverage";
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)
'';
license = with lib.licenses; [ asl20 /* or */ mit ];
maintainers = with lib.maintainers; [ wucke13 ];
};
}

View file

@ -0,0 +1,31 @@
{ stdenv
, lib
, fetchFromGitLab
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "gitlab-clippy";
version = "1.0.3";
src = fetchFromGitLab {
owner = "dlalic";
repo = pname;
rev = version;
sha256 = "sha256-d7SmlAWIV4SngJhIvlud90ZUSF55FWIrzFpkfSXIy2Y=";
};
cargoSha256 = "sha256-ztPbI+ncMNMKnIxUksxgz8GHQpLZ7SVWdC4QJWh18Wk=";
# TODO re-add theses tests once they get fixed in upstream
checkFlags = [
"--skip cli::converts_error_from_pipe"
"--skip cli::converts_warnings_from_pipe"
];
meta = {
homepage = "https://gitlab.com/dlalic/gitlab-clippy";
description = "Convert clippy warnings into GitLab Code Quality report";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wucke13 ];
};
}

View file

@ -7197,6 +7197,8 @@ with pkgs;
gitlabEnterprise = true;
};
gitlab-clippy = callPackage ../development/tools/rust/gitlab-clippy { };
gitlab-runner = callPackage ../development/tools/continuous-integration/gitlab-runner { };
gitlab-shell = callPackage ../applications/version-management/gitlab/gitlab-shell { };
@ -14950,6 +14952,7 @@ with pkgs;
cargo-graph = callPackage ../development/tools/rust/cargo-graph { };
cargo-hack = callPackage ../development/tools/rust/cargo-hack { };
cargo-license = callPackage ../development/tools/rust/cargo-license { };
cargo-llvm-cov = callPackage ../development/tools/rust/cargo-llvm-cov { };
cargo-llvm-lines = callPackage ../development/tools/rust/cargo-llvm-lines { };
cargo-lock = callPackage ../development/tools/rust/cargo-lock { };
cargo-outdated = callPackage ../development/tools/rust/cargo-outdated {

View file

@ -5059,6 +5059,8 @@ self: super: with self; {
lc7001 = callPackage ../development/python-modules/lc7001 { };
lcov_cobertura = callPackage ../development/python-modules/lcov_cobertura { };
ldap3 = callPackage ../development/python-modules/ldap3 { };
ldapdomaindump = callPackage ../development/python-modules/ldapdomaindump { };