-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c27c80c
commit ac92027
Showing
2 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14436,6 +14436,12 @@ | |
githubId = 3159451; | ||
name = "Nicolas Schneider"; | ||
}; | ||
nipeharefa = { | ||
name = "Nipe Harefa"; | ||
email = "[email protected]"; | ||
github = "nipeharefa"; | ||
githubId = 12620257; | ||
}; | ||
NIS = { | ||
name = "NSC IT Solutions"; | ||
github = "dev-nis"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,60 @@ | ||
{ lib, buildGoModule, fetchFromGitHub }: | ||
{ | ||
lib, | ||
stdenv, | ||
installShellFiles, | ||
buildGoModule, | ||
fetchFromGitHub, | ||
versionCheckHook, | ||
}: | ||
|
||
buildGoModule rec { | ||
pname = "deepsource"; | ||
version = "0.8.6"; | ||
|
||
nativeBuildInputs = [ installShellFiles ]; | ||
nativeInstallCheckInputs = [ | ||
versionCheckHook | ||
]; | ||
src = fetchFromGitHub { | ||
owner = "DeepSourceCorp"; | ||
repo = "cli"; | ||
rev = "v${version}"; | ||
hash = "sha256-6uNb4cQVerrlW/eUkjmlO1i1YKYX3qaVdo0i5cczt+I="; | ||
}; | ||
|
||
doCheck = false; | ||
doInstallCheck = true; | ||
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}" ]; | ||
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) | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Command line interface to DeepSource"; | ||
meta = { | ||
description = "Command line interface to DeepSource, the code health platform"; | ||
mainProgram = "deepsource"; | ||
homepage = "https://github.com/DeepSourceCorp/cli"; | ||
license = licenses.bsd3; | ||
license = lib.licenses.bsd2; | ||
maintainers = with lib.maintainers; [ nipeharefa ]; | ||
}; | ||
} |