summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2021-05-31 16:40:17 +0200
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-06-01 06:10:02 +0000
commit58301adb35f8a902da4548292039266d026a9fbc (patch)
tree67188fb0649c2b9ca3329ff397d3f4fb013a3dd2
parentnixos/release-notes: move non-highlights to other mentions (diff)
downloadnixpkgs-58301adb35f8a902da4548292039266d026a9fbc.tar.gz
delve: disable source fortify at runtime
(cherry picked from commit b48e56c74634757b4f85e06377dd4f89c85d9a26)
-rw-r--r--pkgs/development/tools/delve/default.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/tools/delve/default.nix b/pkgs/development/tools/delve/default.nix
index 62e51597055c..2d2eecd54122 100644
--- a/pkgs/development/tools/delve/default.nix
+++ b/pkgs/development/tools/delve/default.nix
@@ -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";