depot/third_party/nixpkgs/pkgs/development/tools/delve/default.nix
Default email bb584b27e9 Project import generated by Copybara.
GitOrigin-RevId: 5181d5945eda382ff6a9ca3e072ed6ea9b547fee
2022-04-15 03:41:22 +02:00

39 lines
1 KiB
Nix

{ lib, buildGoModule, fetchFromGitHub, makeWrapper }:
buildGoModule rec {
pname = "delve";
version = "1.8.2";
src = fetchFromGitHub {
owner = "go-delve";
repo = "delve";
rev = "v${version}";
sha256 = "sha256-rW3uKf5T+ZCjZxVuSFWWXw0mhAW9Y9L83xtU98JTuik=";
};
vendorSha256 = null;
subPackages = [ "cmd/dlv" ];
nativeBuildInputs = [ makeWrapper ];
checkFlags = [ "-short" ];
postInstall = ''
# fortify source breaks build since delve compiles with -O0
wrapProgram $out/bin/dlv \
--prefix disableHardening " " fortify
# add symlink for vscode golang extension
# https://github.com/golang/vscode-go/blob/master/docs/debugging.md#manually-installing-dlv-dap
ln $out/bin/dlv $out/bin/dlv-dap
'';
meta = with lib; {
description = "debugger for the Go programming language";
homepage = "https://github.com/go-delve/delve";
maintainers = with maintainers; [ SuperSandro2000 vdemeester ];
license = licenses.mit;
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
};
}