From 91aed208f515d8a9ef373f638e6c0663e7c3bc87 Mon Sep 17 00:00:00 2001
From: Pamplemousse <xav.maso@gmail.com>
Date: Thu, 20 Aug 2020 11:19:33 -0700
Subject: [PATCH] gdb: Give it a `pname`

Signed-off-by: Pamplemousse <xav.maso@gmail.com>
---
 pkgs/development/tools/misc/gdb/default.nix | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/pkgs/development/tools/misc/gdb/default.nix b/pkgs/development/tools/misc/gdb/default.nix
index 7702df423bb5..a4806634432d 100644
--- a/pkgs/development/tools/misc/gdb/default.nix
+++ b/pkgs/development/tools/misc/gdb/default.nix
@@ -17,20 +17,19 @@
 }:
 
 let
-  basename = "gdb-${version}";
-  version = "9.2";
+  basename = "gdb";
+  targetPrefix = stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+                 "${stdenv.targetPlatform.config}-";
 in
 
 assert pythonSupport -> python3 != null;
 
 stdenv.mkDerivation rec {
-  name =
-    stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
-                              (stdenv.targetPlatform.config + "-")
-    + basename;
+  pname = targetPrefix + basename;
+  version = "9.2";
 
   src = fetchurl {
-    url = "mirror://gnu/gdb/${basename}.tar.xz";
+    url = "mirror://gnu/gdb/${basename}-${version}.tar.xz";
     sha256 = "0mf5fn8v937qwnal4ykn3ji1y2sxk0fa1yfqi679hxmpg6pdf31n";
   };