delve: adopt modern best practices (#480957)

This commit is contained in:
Peder Bergebakken Sundt
2026-01-20 01:11:23 +00:00
committed by GitHub
+15 -3
View File
@@ -3,16 +3,17 @@
buildGoModule,
fetchFromGitHub,
stdenv,
nix-update-script,
}:
buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "delve";
version = "1.26.0";
src = fetchFromGitHub {
owner = "go-delve";
repo = "delve";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-tFd8g866nRSNUVNz+6SM6YLl4ys3AUP3c8eT1kWbjKY=";
};
@@ -24,6 +25,11 @@ buildGoModule rec {
subPackages = [ "cmd/dlv" ];
ldflags = [
"-s"
"-w"
];
hardeningDisable = [ "fortify" ];
preCheck = ''
@@ -44,11 +50,17 @@ buildGoModule rec {
ln $out/bin/dlv $out/bin/dlv-dap
'';
# delve doesn't support --version
doInstallCheck = false;
passthru.updateScript = nix-update-script { };
meta = {
description = "Debugger for the Go programming language";
homepage = "https://github.com/go-delve/delve";
changelog = "https://github.com/go-delve/delve/blob/v${finalAttrs.version}/CHANGELOG.md";
maintainers = with lib.maintainers; [ vdemeester ];
license = lib.licenses.mit;
mainProgram = "dlv";
};
}
})