From d8ccbf3c1e00a2113fe0b8b149e8c1fe9afd356a Mon Sep 17 00:00:00 2001 From: Nipe Setiawan Harefa <nipeharefa@gmail.com> Date: Sat, 2 Nov 2024 16:07:16 +0700 Subject: [PATCH 1/2] maintainers: add nipeharefa --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 6fd827cd72b9..8d817fbb2728 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -15580,6 +15580,12 @@ githubId = 3159451; name = "Nicolas Schneider"; }; + nipeharefa = { + name = "Nipe Harefa"; + email = "nipeharefa@gmail.com"; + github = "nipeharefa"; + githubId = 12620257; + }; NIS = { name = "NSC IT Solutions"; github = "dev-nis"; From 75d4c782597e26d52bbc00043a6087bed0659148 Mon Sep 17 00:00:00 2001 From: Nipe Setiawan Harefa <nipeharefa@gmail.com> Date: Sat, 2 Nov 2024 16:07:42 +0700 Subject: [PATCH 2/2] deepsource: init at 0.8.6 --- pkgs/by-name/de/deepsource/package.nix | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pkgs/by-name/de/deepsource/package.nix diff --git a/pkgs/by-name/de/deepsource/package.nix b/pkgs/by-name/de/deepsource/package.nix new file mode 100644 index 000000000000..10d48b0fc4ce --- /dev/null +++ b/pkgs/by-name/de/deepsource/package.nix @@ -0,0 +1,62 @@ +{ + lib, + stdenv, + installShellFiles, + buildGoModule, + fetchFromGitHub, + versionCheckHook, +}: + +buildGoModule rec { + pname = "deepsource"; + version = "0.8.6"; + + src = fetchFromGitHub { + owner = "DeepSourceCorp"; + repo = "cli"; + rev = "v${version}"; + hash = "sha256-6uNb4cQVerrlW/eUkjmlO1i1YKYX3qaVdo0i5cczt+I="; + }; + + 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) + ''; + + 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 ]; + }; +}