delve: disable source fortify at runtime

This commit is contained in:
Jörg Thalheim 2021-05-31 16:40:17 +02:00
parent 049dc4c452
commit b48e56c746
No known key found for this signature in database
GPG key ID: B3F5D81B0C6967C4

View file

@ -1,4 +1,4 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoPackage, fetchFromGitHub, makeWrapper }:
buildGoPackage rec {
pname = "delve";
@ -14,6 +14,16 @@ buildGoPackage rec {
sha256 = "sha256-bTVCasemE8Vyjcs8wZBiiXEsW3UBndjpPQ5bi+4vQkw=";
};
subPackages = [ "cmd/dlv" ];
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
# fortify source breaks build since delve compiles with -O0
wrapProgram $out/bin/dlv \
--set "disableHardening" fortify
'';
meta = with lib; {
description = "debugger for the Go programming language";
homepage = "https://github.com/derekparker/delve";