2021-05-31 15:40:17 +01:00
|
|
|
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper }:
|
2016-11-23 22:53:07 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "delve";
|
2021-12-27 05:33:52 +00:00
|
|
|
version = "1.8.0";
|
2016-11-23 22:53:07 +00:00
|
|
|
|
2019-03-05 17:50:17 +00:00
|
|
|
goPackagePath = "github.com/go-delve/delve";
|
2017-03-01 12:48:04 +00:00
|
|
|
excludedPackages = "\\(_fixtures\\|scripts\\|service/test\\)";
|
2016-11-23 22:53:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-03-05 17:50:17 +00:00
|
|
|
owner = "go-delve";
|
2016-11-23 22:53:07 +00:00
|
|
|
repo = "delve";
|
|
|
|
rev = "v${version}";
|
2021-12-27 05:33:52 +00:00
|
|
|
sha256 = "sha256-NihlBFZ5xu+DMBtUiGyjxpgob2hoLlFJ7MfnM55feuw=";
|
2016-11-23 22:53:07 +00:00
|
|
|
};
|
|
|
|
|
2021-05-31 15:40:17 +01:00
|
|
|
subPackages = [ "cmd/dlv" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
# fortify source breaks build since delve compiles with -O0
|
|
|
|
wrapProgram $out/bin/dlv \
|
2021-06-01 06:23:50 +01:00
|
|
|
--prefix disableHardening " " fortify
|
2021-10-22 16:43:14 +01: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-05-31 15:40:17 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2016-11-23 22:53:07 +00:00
|
|
|
description = "debugger for the Go programming language";
|
2022-01-01 13:34:35 +00:00
|
|
|
homepage = "https://github.com/go-delve/delve";
|
2021-10-22 16:43:14 +01:00
|
|
|
maintainers = with maintainers; [ SuperSandro2000 vdemeester ];
|
2018-01-02 10:23:00 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ] ++ platforms.darwin;
|
2016-11-23 22:53:07 +00:00
|
|
|
};
|
|
|
|
}
|