2021-06-01 10:57:12 +00:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "delve";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "1.7.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/go-delve/delve";
|
|
|
|
excludedPackages = "\\(_fixtures\\|scripts\\|service/test\\)";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "go-delve";
|
|
|
|
repo = "delve";
|
|
|
|
rev = "v${version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-Mye8Gh73yQ1fhjVpEOKBQGjdOzgMUqzdNiBjRRTteTg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-01 10:57:12 +00:00
|
|
|
subPackages = [ "cmd/dlv" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# fortify source breaks build since delve compiles with -O0
|
|
|
|
wrapProgram $out/bin/dlv \
|
|
|
|
--prefix disableHardening " " fortify
|
2021-10-28 06:52:43 +00:00
|
|
|
|
|
|
|
# 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
|
2021-06-01 10:57:12 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "debugger for the Go programming language";
|
|
|
|
homepage = "https://github.com/derekparker/delve";
|
2021-10-28 06:52:43 +00:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 vdemeester ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|