summary refs log tree commit diff
path: root/pkgs/development/tools/misc/gdb
diff options
context:
space:
mode:
authorTmplt <tmplt@dragons.rocks>2019-11-19 21:40:16 +0100
committerTmplt <tmplt@dragons.rocks>2019-11-19 21:40:16 +0100
commita3e008420e8d04d8b444272640deee52ef0dac8f (patch)
tree48589161bc2f7f130b79c932b9cb9f54c1addbc6 /pkgs/development/tools/misc/gdb
parent6cff4ce58b28af76e69fd2b4e0fd194207fe70ee (diff)
downloadnixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar.gz
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar.bz2
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar.lz
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar.xz
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.tar.zst
nixpkgs-a3e008420e8d04d8b444272640deee52ef0dac8f.zip
gdb: configure a safe path instead of wrapping
Diffstat (limited to 'pkgs/development/tools/misc/gdb')
-rw-r--r--pkgs/development/tools/misc/gdb/default.nix1
-rw-r--r--pkgs/development/tools/misc/gdb/wrapper.nix31
2 files changed, 1 insertions, 31 deletions
diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index e990cb683e7..10afc8d421e 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -70,6 +70,7 @@ stdenv.mkDerivation rec {
     "--with-gmp=${gmp.dev}"
     "--with-mpfr=${mpfr.dev}"
     "--with-expat" "--with-libexpat-prefix=${expat.dev}"
+    "--with-auto-load-safe-path=${stdenv.cc.cc.lib}"
   ] ++ stdenv.lib.optional (!pythonSupport) "--without-python";
 
   postInstall =
diff --git a/pkgs/development/tools/misc/gdb/wrapper.nix b/pkgs/development/tools/misc/gdb/wrapper.nix
deleted file mode 100644
index 2313b0b897a..00000000000
--- a/pkgs/development/tools/misc/gdb/wrapper.nix
+++ /dev/null
@@ -1,31 +0,0 @@
-{ stdenv, lib, makeWrapper, gdb-unwrapped, safePaths }:
-
-let
-  gdb = gdb-unwrapped;
-in
-  stdenv.mkDerivation {
-    name = gdb.name;
-    nativeBuildInputs = [ makeWrapper ];
-    propagatedUserEnvPkgs = [ gdb ];
-    phases = "installPhase fixupPhase";
-
-    # Find all gdb plugins in `safePaths` and
-    # mark these files as safe to load.
-    installPhase = ''
-      mkdir -p $out/share/gdb
-      initScript=$out/share/gdb/gdbinit
-      touch $initScript
-
-      for safePath in ${lib.concatStringsSep " " safePaths}; do
-        for plugin in $(find $safePath | grep -- '.*-gdb.*'); do
-          echo add-auto-load-safe-path $plugin >> $initScript
-        done
-      done
-
-      makeWrapper "${gdb}/bin/gdb" \
-        "$out/bin/gdb" \
-        --add-flags "-x $initScript"
-    '';
-
-    meta = gdb.meta;
-  }