Files
nixpkgs/pkgs/by-name/de/deepsource/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

65 lines
1.5 KiB
Nix

{
lib,
stdenv,
installShellFiles,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "deepsource";
version = "0.10.1";
src = fetchFromGitHub {
owner = "DeepSourceCorp";
repo = "cli";
rev = "v${version}";
hash = "sha256-eJRoy/mgcdYgUV9covQbWwn5sk1hJB1UkKnNd/hjuEY=";
};
nativeBuildInputs = [ installShellFiles ];
doCheck = true;
checkFlags =
let
# Skip tests that require network access
skippedTests = [
"TestReportKeyValueWorkflow"
"TestReportAnalyzerTypeWorkflow"
"TestReportKeyValueFileWorkflow"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
vendorHash = "sha256-SsMq4ngq3sSOL28ysHTxTF4CT9sIcCIW7yIhBxIPrNs=";
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd deepsource \
--bash <($out/bin/deepsource completion bash) \
--fish <($out/bin/deepsource completion fish) \
--zsh <($out/bin/deepsource completion zsh)
'';
doInstallCheck = true;
versionCheckProgramArg = "version";
nativeInstallCheckInputs = [
versionCheckHook
];
meta = {
description = "Command line interface to DeepSource, the code health platform";
mainProgram = "deepsource";
homepage = "https://github.com/DeepSourceCorp/cli";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ nipeharefa ];
};
}